| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final Charset |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(String
the source string. source, String the target string. target)Implements abstract java. Implements java. Compares the source string to the target string according to the collation rules for this Collator. |
| public Charset | |
| public CollationKey | getCollationKey(String
the string to be transformed into a collation key. source)Implements abstract java. Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. |
| public int | hashCode()
Implements abstract java. Generates the hash code for this Collator. |
| pack-priv byte[] |
| charset | back to summary |
|---|---|
| private final Charset charset | |
| CharsetCollator | back to summary |
|---|---|
| public CharsetCollator(Charset charset) | |
| compare | back to summary |
|---|---|
| public int compare(String source, String target) Implements abstract java. Implements java. Doc from java. Compares the source string to the target string according to the collation rules for this Collator. Returns an integer less than, equal to or greater than zero depending on whether the source String is less than, equal to or greater than the target string. See the Collator class description for an example of use. For a one time comparison, this method has the best performance. If a given String will be involved in multiple comparisons, CollationKey.compareTo has the best performance. See the Collator class description for an example using CollationKeys. | |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() | |
| getCollationKey | back to summary |
|---|---|
| public CollationKey getCollationKey(String source) Implements abstract java. Doc from java. Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. CollationKeys provide better performance than Collator.compare when Strings are involved in multiple comparisons. See the Collator class description for an example using CollationKeys.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Doc from java. Generates the hash code for this Collator.
| |
| toBytes | back to summary |
|---|---|
| pack-priv byte[] toBytes(String source) Convert the source to bytes, using the character set.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(CollationKey
target CollationKey target)Implements abstract java. Implements java. Compare this CollationKey to the target CollationKey. |
| public byte[] | toByteArray()
Implements abstract java. Converts the CollationKey to a sequence of bits. |
| bytes | back to summary |
|---|---|
| private final byte[] bytes | |
| CharsetCollationKey | back to summary |
|---|---|
| pack-priv CharsetCollationKey(String source) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(CollationKey target) Implements abstract java. Implements java. Doc from java. Compare this CollationKey to the target CollationKey. The collation rules of the Collator object which created these keys are applied Note CollationKeys created by different Collators can not be compared.
| |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Implements abstract java. Doc from java. Converts the CollationKey to a sequence of bits. If two CollationKeys 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.
| |