java.lang.Object | +--java.text.CollationKeyAll Implemented Interfaces:
int | compareTo(java.lang.Object obj) This method compares the specified object to this one. |
int | compareTo(java.text.CollationKey ck) This method compares the specified object to this one. |
boolean | equals(java.lang.Object obj) This method tests the specified |
java.lang.String | getSourceString() This method returns the |
int | hashCode() This method returns a hash value for this object. |
byte[] | toByteArray() This method returns the collation bit sequence as a byte array. |
public int compareTo(java.lang.Object obj)
CollationKey
or an exception
will be thrown. An integer is returned which indicates whether the
specified object is less than, greater than, or equal to this object.
obj
- The Object
to compare against this one.public int compareTo(java.text.CollationKey ck)
ck
- The CollationKey
to compare against this one.public boolean equals(java.lang.Object obj)
Object
for equality with
this object. This will be true if and only if:
null
CollationKey
.
Collator
as this object.
obj
- The Object
to test for equality.true
if the specified object is equal to this one, false
otherwise.public String getSourceString()
String
that this object was created
from.
String
for this object.public int hashCode()
public byte[] toByteArray()
String
for under a particularCollator
. This value may be compared bitwise against anotherCollationKey
representing a differentString
under the sameCollator
in a manner than is usually more efficient than using the rawCollator
compare methods. There is overhead associated with calculating this value, so it is generally not advisable to computeCollationKey
's unless multiple comparisons against aString
will be done. (For example, in a sort routine).This class cannot be instantiated directly. Instead, a
CollationKey
is created by calling thegetCollationKey
method on an instance ofCollator
.