| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| public static final String | CHARSET
This constant means the charset specified should be used. |
| public static final String | DEFAULT
This constant means the default collator should be used, even if ICU4J is in the classpath. |
| public static final String | ICU4J
This constant means ICU4J should be used (this will fail if it is not in the classpath). |
| private static volatile CompareMode | |
| private static Locale[] | |
| private final String | |
| public static final String | OFF
This constant means there is no collator set, and the default string comparison is to be used. |
| private final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Value
the first object to be compared. o1, Value the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| pack-priv static boolean | Returns: true if they matchthe locale locale, String the name name)Compare name of the locale with the given name. |
| public int | Returns: -1 if the first string is 'smaller', 1 if the second string is smaller, and 0 if they are equalthe first string a, String the second string b, boolean true if a case-insensitive comparison should be made ignoreCase)Compare two strings. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Implements java. Indicates whether some other object is "equal to" this comparator. |
| public boolean | Returns: true if the characters are equalsthe first string a, int the character index in the first string ai, String the second string b, int the character index in the second string bi, boolean true if a case-insensitive comparison should be made ignoreCase)Compare two characters in a string. |
| public static Locale[] | Returns: available locales for collations.if onlyIfInitialized)true, returns null when locales are not yet
initializedReturns available locales for collations. |
| public static Collator | Returns: the collatorthe language name name)Get the collator object for the given language name or language / country combination. |
| public static CompareMode | Returns: the compare modethe collation name or null name, int the collation strength strength)Create a new compare mode with the given collator and strength. |
| public static String | |
| public String | |
| public int | |
| public int |
| CAN_USE_ICU4J | back to summary |
|---|---|
| private static final boolean CAN_USE_ICU4J | |
| CHARSET | back to summary |
|---|---|
| public static final String CHARSET This constant means the charset specified should be used. This will fail if the specified charset does not exist. | |
| DEFAULT | back to summary |
|---|---|
| public static final String DEFAULT This constant means the default collator should be used, even if ICU4J is in the classpath. | |
| ICU4J | back to summary |
|---|---|
| public static final String ICU4J This constant means ICU4J should be used (this will fail if it is not in the classpath). | |
| lastUsed | back to summary |
|---|---|
| private static volatile CompareMode lastUsed | |
| LOCALES | back to summary |
|---|---|
| private static Locale[] LOCALES | |
| name | back to summary |
|---|---|
| private final String name | |
| OFF | back to summary |
|---|---|
| public static final String OFF This constant means there is no collator set, and the default string comparison is to be used. | |
| strength | back to summary |
|---|---|
| private final int strength | |
| CompareMode | back to summary |
|---|---|
| protected CompareMode(String name, int strength) | |
| compare | back to summary |
|---|---|
| public int compare(Value o1, Value o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compareLocaleNames | back to summary |
|---|---|
| pack-priv static boolean compareLocaleNames(Locale locale, String name) Compare name of the locale with the given name. The case of the name is ignored. | |
| compareString | back to summary |
|---|---|
| public int compareString(String a, String b, boolean ignoreCase) Compare two strings. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements java. Doc from java. Indicates whether some other object is "equal to"
this comparator. This method must obey the general contract of
Note that it is always safe not to override
| |
| equalsChars | back to summary |
|---|---|
| public boolean equalsChars(String a, int ai, String b, int bi, boolean ignoreCase) Compare two characters in a string. | |
| getCollationLocales | back to summary |
|---|---|
| public static Locale[] getCollationLocales(boolean onlyIfInitialized) Returns available locales for collations.
| |
| getCollator | back to summary |
|---|---|
| public static Collator getCollator(String name) Get the collator object for the given language name or language / country combination. | |
| getInstance | back to summary |
|---|---|
| public static CompareMode getInstance(String name, int strength) Create a new compare mode with the given collator and strength. If required, a new CompareMode is created, or if possible the last one is returned. A cache is used to speed up comparison when using a collator; CollationKey objects are cached.
| |
| getName | back to summary |
|---|---|
| public static String getName(Locale l) Get the collation name. | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getStrength | back to summary |
|---|---|
| public int getStrength() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |