Bali Share 1.1.18

oracle.bali.share.collection
Class StringKey

java.lang.Object
  |
  +--oracle.bali.share.collection.StringKey
All Implemented Interfaces:
java.io.Serializable

public final class StringKey
extends java.lang.Object
implements java.io.Serializable

Class or use as a key for Hashtables. This class caches the Hash code for better performance and also has a higher performance implementation of equals

Since:
Share 1.0
See Also:
Hashtable, Serialized Form

Constructor Summary
StringKey(java.lang.String hashString)
          Construct a StringKey from a String.
 
Method Summary
 boolean equals(java.lang.Object compareTo)
          Checks whether two StringKey objects are equal.
 java.lang.String getString()
          Return the String that is wrapped by the StringKey.
 int hashCode()
          Returns the hashcode for this StringKey.
 java.lang.String toString()
          Returns a String object representing this StringKey.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringKey

public StringKey(java.lang.String hashString)
Construct a StringKey from a String.

Since:
Share 1.0
Method Detail

getString

public java.lang.String getString()
Return the String that is wrapped by the StringKey.

equals

public boolean equals(java.lang.Object compareTo)
Checks whether two StringKey objects are equal.

Overrides:
equals in class java.lang.Object
Since:
Share 1.0

hashCode

public int hashCode()
Returns the hashcode for this StringKey.
Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode for this StringKey.
Since:
Share 1.0

toString

public java.lang.String toString()
Returns a String object representing this StringKey.

Overrides:
toString in class java.lang.Object
Since:
Share 1.0

Bali Share 1.1.18