@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if ( ! (o instanceof DimensionValues)) return false;
        DimensionValues other = (DimensionValues) o;
        for (int i = 0; i < this.size() || i < other.size(); i++) {
            if (get(i) == null) {
                if (other.get(i) != null) return false;
            }
            else {
                if ( ! get(i).equals(other.get(i))) return false;
            }
        }
        return true;
    }
Helper method which uses compareTo to return whether this is most specific
container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java