@Override
    public int compareTo(DimensionValues other) {
        for (int i=0; i < this.size() || i < other.size(); i++) {
            if (get(i) != null && other.get(i) == null)
                return -1;
            if (get(i) == null && other.get(i) != null)
                return 1;
        }
        return 0;
    }
Implements the sort order of this which is based on specificity
where dimensions to the left are more significant:
-1 is returned if this is more specific than other,
1 is returned if other is more specific than this,
0 is returned if none is more specific than the other.
<p>
<b>Note:</b> This ordering is not consistent with equals - it returns 0 when the same dimensions
are <i>set</i>, regardless of what they are set <i>to</i>.
container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java