/** * Get the <code>String</code> value that this <code>StringIdItem</code> represents * @return the <code>String</code> value that this <code>StringIdItem</code> represents */ public String getStringValue() { return stringDataItem.getStringValue(); }
/** {@inheritDoc} */ public int compareTo(StringDataItem o) { return getStringValue().compareTo(o.getStringValue()); }
/** * calculate and cache the hashcode */ private void calcHashCode() { hashCode = getStringValue().hashCode(); }
@Override public boolean equals(Object o) { if (this==o) { return true; } if (o==null || !this.getClass().equals(o.getClass())) { return false; } //This assumes that the referenced items have been interned in both objects. //This is a valid assumption because all outside code must use the static //"getInterned..." style methods to make new items, and any item created //internally is guaranteed to be interned StringDataItem other = (StringDataItem)o; return getStringValue().equals(other.getStringValue()); } }
/** {@inheritDoc} */ public String getConciseIdentity() { return "string_data_item: \"" + Utf8Utils.escapeString(getStringValue()) + "\""; }
/** * Get the <code>String</code> value that this <code>StringIdItem</code> represents * @return the <code>String</code> value that this <code>StringIdItem</code> represents */ public String getStringValue() { return stringDataItem.getStringValue(); }
/** {@inheritDoc} */ public int compareTo(StringDataItem o) { return getStringValue().compareTo(o.getStringValue()); }
/** * calculate and cache the hashcode */ private void calcHashCode() { hashCode = getStringValue().hashCode(); }
@Override public boolean equals(Object o) { if (this==o) { return true; } if (o==null || !this.getClass().equals(o.getClass())) { return false; } //This assumes that the referenced items have been interned in both objects. //This is a valid assumption because all outside code must use the static //"getInterned..." style methods to make new items, and any item created //internally is guaranteed to be interned StringDataItem other = (StringDataItem)o; return getStringValue().equals(other.getStringValue()); } }
/** {@inheritDoc} */ public String getConciseIdentity() { return "string_data_item: \"" + Utf8Utils.escapeString(getStringValue()) + "\""; }