java.text
public
final
class
java.text.CollationKey
CollationKey represents the collation order of a particular String for a
specific Collator. CollationKeys can be compared to determine the relative
ordering of their source Strings. This is useful when the Strings must be
compared multiple times, as in sorting.
Summary
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Methods
public
int
compareTo(CollationKey value)
Compare the receiver to the specified CollationKey to determine the
relative ordering.
Returns
- an int < 0 if this CollationKey is less than the specified
CollationKey, 0 if they are equal, and > 0 if this CollationKey
is greater
public
boolean
equals(Object object)
Compares the specified object to this CollationKey and answer if they are
equal. The object must be an instance of CollationKey and have the same
source string and collation key. The instances of CollationKey must have
been created by the same Collator.
Parameters
object
| the object to compare with this object |
Returns
- true if the specified object is equal to this CollationKey, false
otherwise
public
String
getSourceString()
Answer the String from which this CollationKey was created.
public
int
hashCode()
Returns an integer hash code for the receiver. Objects which are equal
answer the same value for this method.
public
byte[]
toByteArray()
Answer the collation key as a byte array.