@Override
    public boolean equals(Object o) {
        if (o == null) return false;
        if (o == this) return true;
        if (o.getClass() != this.getClass()) return false;
        Item other = (Item)o;
        if (this.weight != other.weight) return false;
        if (this.fromSpecialToken != other.fromSpecialToken) return false;
        if (this.creator != other.creator) return false;
        if ( ! Objects.equals(this.annotations, other.annotations)) return false;
        if (this.isRanked != other.isRanked) return false;
        if (this.usePositionData != other.usePositionData) return false;
        if ( ! Objects.equals(this.label, other.label)) return false;
        if (this.uniqueID != other.uniqueID) return false;
        if ( ! Objects.equals(this.connectedItem, other.connectedItem)) return false;
        if (this.connectivity != other.connectivity) return false;
        if (this.significance != other.significance) return false;
        if (! Objects.equals(this.documentFrequency, other.documentFrequency)) return false;
        if (this.language != other.language) 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/Item.java