diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/query/Item.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/query/Item.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/Item.java b/container-search/src/main/java/com/yahoo/prelude/query/Item.java index d8b5fc9451a..9d8ccce1b76 100644 --- a/container-search/src/main/java/com/yahoo/prelude/query/Item.java +++ b/container-search/src/main/java/com/yahoo/prelude/query/Item.java @@ -373,6 +373,7 @@ public abstract class Item implements Cloneable { protected abstract void appendBodyString(StringBuilder buffer); /** Returns a deep copy of this item */ + @Override public Item clone() { try { Item clone = (Item)super.clone(); @@ -389,6 +390,7 @@ public abstract class Item implements Cloneable { * Returns whether this item is of the same class and * contains the same state as the given item */ + @Override public boolean equals(Object object) { if (object == null) { return false; @@ -405,11 +407,11 @@ public abstract class Item implements Cloneable { if (this.weight != other.weight) { return false; } - // if (this.termIndex!=other.termIndex) return false; return true; } + @Override public int hashCode() { return weight * 29 + creator.code; } @@ -433,12 +435,7 @@ public abstract class Item implements Cloneable { this.label = label; } - /** - * Obtain the label for this item. This method will return null if - * no label has been set. - * - * @return label for this item - **/ + /** Returns the label for this item. This method will return null if no label has been set. */ public String getLabel() { return label; } |