| java.lang.Object java.text.Collator
All known Subclasses: java.text.RuleBasedCollator,
Collator | abstract public class Collator implements Comparator<Object>,Cloneable(Code) | | Collator is an abstract class which is the root of classes which provide
Locale specific String comparison to determine their ordering with respect to
each other.
|
Field Summary | |
final public static int | CANONICAL_DECOMPOSITION Constant used to specify the decomposition rule. | final static int | EQUAL | final public static int | FULL_DECOMPOSITION Constant used to specify the decomposition rule. | final static int | GREATER | final public static int | IDENTICAL Constant used to specify the collation strength. | final static int | LESS | final public static int | NO_DECOMPOSITION Constant used to specify the decomposition rule. | final public static int | PRIMARY Constant used to specify the collation strength. | final public static int | SECONDARY Constant used to specify the collation strength. | final public static int | TERTIARY Constant used to specify the collation strength. | com.ibm.icu.text.Collator | icuColl |
Constructor Summary | |
| Collator(com.ibm.icu.text.Collator wrapper) | protected | Collator() Constructs a new instance of this Collator. |
Method Summary | |
public Object | clone() Answers a new Collator with the same decomposition rule and strength
value as this Collator. | public int | compare(Object object1, Object object2) Compares the two objects to determine their relative ordering. | abstract public int | compare(String string1, String string2) Compares the two Strings to determine their relative ordering. | public boolean | equals(Object object) Compares the specified object to this Collator and answer if they are
equal. | public boolean | equals(String string1, String string2) Compares the two Strings using the collation rules to determine if they
are equal. | public static Locale[] | getAvailableLocales() Gets the list of installed Locales which support Collator. | abstract public CollationKey | getCollationKey(String string) Answers a CollationKey for the specified String for this Collator with
the current decomposition rule and strength value.
Parameters: string - the collation key. | public int | getDecomposition() Answers the decomposition rule for this Collator. | public static Collator | getInstance() Answers a Collator instance which is appropriate for the default Locale. | public static Collator | getInstance(Locale locale) Answers a Collator instance which is appropriate for the specified
Locale. | public int | getStrength() Answers the strength value for this Collator. | abstract public int | hashCode() Answers an integer hash code for the receiver. | public void | setDecomposition(int value) Sets the decomposition rule for this Collator. | public void | setStrength(int value) Sets the strength value for this Collator. |
CANONICAL_DECOMPOSITION | final public static int CANONICAL_DECOMPOSITION(Code) | | Constant used to specify the decomposition rule.
|
EQUAL | final static int EQUAL(Code) | | |
FULL_DECOMPOSITION | final public static int FULL_DECOMPOSITION(Code) | | Constant used to specify the decomposition rule.
|
GREATER | final static int GREATER(Code) | | |
IDENTICAL | final public static int IDENTICAL(Code) | | Constant used to specify the collation strength.
|
LESS | final static int LESS(Code) | | |
NO_DECOMPOSITION | final public static int NO_DECOMPOSITION(Code) | | Constant used to specify the decomposition rule.
|
PRIMARY | final public static int PRIMARY(Code) | | Constant used to specify the collation strength.
|
SECONDARY | final public static int SECONDARY(Code) | | Constant used to specify the collation strength.
|
TERTIARY | final public static int TERTIARY(Code) | | Constant used to specify the collation strength.
|
icuColl | com.ibm.icu.text.Collator icuColl(Code) | | |
Collator | Collator(com.ibm.icu.text.Collator wrapper)(Code) | | |
Collator | protected Collator()(Code) | | Constructs a new instance of this Collator.
|
clone | public Object clone()(Code) | | Answers a new Collator with the same decomposition rule and strength
value as this Collator.
a shallow copy of this Collator See Also: java.lang.Cloneable |
compare | public int compare(Object object1, Object object2)(Code) | | Compares the two objects to determine their relative ordering. The
objects must be Strings.
Parameters: object1 - the first String to compare Parameters: object2 - the second String to compare an int < 0 if object1 is less than object2, 0 if they are equal,and > 0 if object1 is greater than object2 exception: ClassCastException - when the objects are not Strings |
compare | abstract public int compare(String string1, String string2)(Code) | | Compares the two Strings to determine their relative ordering.
Parameters: string1 - the first String to compare Parameters: string2 - the second String to compare an int < 0 if string1 is less than string2, 0 if they are equal,and > 0 if string1 is greater than string2 |
equals | public boolean equals(Object object)(Code) | | Compares the specified object to this Collator and answer if they are
equal. The object must be an instance of Collator and have the same
strength and decomposition values.
Parameters: object - the object to compare with this object true if the specified object is equal to this Collator, falseotherwise See Also: Collator.hashCode |
equals | public boolean equals(String string1, String string2)(Code) | | Compares the two Strings using the collation rules to determine if they
are equal.
Parameters: string1 - the first String to compare Parameters: string2 - the second String to compare true if the strings are equal using the collation rules, falseotherwise |
getAvailableLocales | public static Locale[] getAvailableLocales()(Code) | | Gets the list of installed Locales which support Collator.
an array of Locale |
getCollationKey | abstract public CollationKey getCollationKey(String string)(Code) | | Answers a CollationKey for the specified String for this Collator with
the current decomposition rule and strength value.
Parameters: string - the collation key. a CollationKey |
getDecomposition | public int getDecomposition()(Code) | | Answers the decomposition rule for this Collator.
the decomposition rule, either NO_DECOMPOSITION,CANONICAL_DECOMPOSITION or FULL_DECOMPOSITION |
getInstance | public static Collator getInstance()(Code) | | Answers a Collator instance which is appropriate for the default Locale.
a Collator |
getInstance | public static Collator getInstance(Locale locale)(Code) | | Answers a Collator instance which is appropriate for the specified
Locale.
Parameters: locale - the Locale a Collator |
getStrength | public int getStrength()(Code) | | Answers the strength value for this Collator.
the strength value, either PRIMARY, SECONDARY, TERTIARY, orIDENTICAL |
setDecomposition | public void setDecomposition(int value)(Code) | | Sets the decomposition rule for this Collator.
Parameters: value - the decomposition rule, either NO_DECOMPOSITION,CANONICAL_DECOMPOSITION or FULL_DECOMPOSITION exception: IllegalArgumentException - when the decomposition rule is not valid |
setStrength | public void setStrength(int value)(Code) | | Sets the strength value for this Collator.
Parameters: value - the strength value, either PRIMARY, SECONDARY, TERTIARY, orIDENTICAL exception: IllegalArgumentException - when the strength value is not valid |
|
|