| Access | Constructor and Description |
|---|---|
| pack-priv | RuleBasedCollationKey(String source, String key)
A RuleBasedCollationKey can only be generated by Collator objects. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: Returns an integer value. Value is less than zero if this is less than target, value is zero if this and target are equal and value is greater than zero if this is greater than target.target RuleBasedCollationKey target)Implements abstract java. Implements java. Compare this RuleBasedCollationKey to target. |
| public boolean | Returns: Returns true if two objects are equal, false otherwise.the RuleBasedCollationKey to compare to. target)Overrides java. Compare this RuleBasedCollationKey and the target for equality. |
| public int | Returns: the hash value based on the string's collation order.Overrides java. Creates a hash code for this RuleBasedCollationKey. |
| public byte[] | toByteArray()
Implements abstract java. Converts the RuleBasedCollationKey to a sequence of bits. |
| key | back to summary |
|---|---|
| private String key | |
| RuleBasedCollationKey | back to summary |
|---|---|
| pack-priv RuleBasedCollationKey(String source, String key) A RuleBasedCollationKey can only be generated by Collator objects. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(CollationKey target) Implements abstract java. Implements java. Compare this RuleBasedCollationKey to target. The collation rules of the Collator object which created these keys are applied Note RuleBasedCollationKeys created by different Collators can not be compared.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object target) Overrides java. Compare this RuleBasedCollationKey and the target for equality. The collation rules of the Collator object which created these keys are applied Note RuleBasedCollationKeys created by different Collators can not be compared.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Creates a hash code for this RuleBasedCollationKey. The hash value is calculated on the key itself, not the String from which the key was created. Thus if x and y are RuleBasedCollationKeys, then x.hashCode(x) == y.hashCode() if x.equals(y) is true. This allows language-sensitive comparison in a hash table. See the CollatinKey class description for an example.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Implements abstract java. Converts the RuleBasedCollationKey to a sequence of bits. If two RuleBasedCollationKeys could be legitimately compared, then one could compare the byte arrays for each of those keys to obtain the same result. Byte arrays are organized most significant byte first. | |