@Override
    public boolean equals(Object object) {
        if (!super.equals(object)) return false;

        CompositeItem other = (CompositeItem) object; // Ensured by superclass
        if ( ! this.subitems.equals(other.subitems)) return false;
        return true;
    }
Returns whether this item is of the same class and contains the same state as the given item.
container-search/src/main/java/com/yahoo/prelude/query/CompositeItem.java