| java.lang.Object | |
| ↳ | java.text.Collator |
Known Direct Subclasses
|
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.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | CANONICAL_DECOMPOSITION | Constant used to specify the decomposition rule. | |||||||||
| int | FULL_DECOMPOSITION | Constant used to specify the decomposition rule. | |||||||||
| int | IDENTICAL | Constant used to specify the collation strength. | |||||||||
| int | NO_DECOMPOSITION | Constant used to specify the decomposition rule. | |||||||||
| int | PRIMARY | Constant used to specify the collation strength. | |||||||||
| int | SECONDARY | Constant used to specify the collation strength. | |||||||||
| int | TERTIARY | Constant used to specify the collation strength. | |||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of this Collator.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a new Collator with the same decomposition rule and strength
value as this Collator.
| |||||||||||
Compares the two Strings to determine their relative ordering.
| |||||||||||
Compares the two objects to determine their relative ordering.
| |||||||||||
Compares the two Strings using the collation rules to determine if they
are equal.
| |||||||||||
Compares the specified object to this Collator and answer if they are
equal.
| |||||||||||
Gets the list of installed Locales which support Collator.
| |||||||||||
Returns a CollationKey for the specified String for this Collator with
the current decomposition rule and strength value.
| |||||||||||
Returns the decomposition rule for this Collator.
| |||||||||||
Returns a Collator instance which is appropriate for the default Locale.
| |||||||||||
Returns a Collator instance which is appropriate for the specified
Locale.
| |||||||||||
Returns the strength value for this Collator.
| |||||||||||
Returns an integer hash code for the receiver.
| |||||||||||
Sets the decomposition rule for this Collator.
| |||||||||||
Sets the strength value for this Collator.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface java.util.Comparator
| |||||||||||
Constant used to specify the decomposition rule.
Constant used to specify the decomposition rule.
Constant used to specify the collation strength.
Constant used to specify the decomposition rule.
Constant used to specify the collation strength.
Constant used to specify the collation strength.
Constant used to specify the collation strength.
Constructs a new instance of this Collator.
Returns a new Collator with the same decomposition rule and strength value as this Collator.
Compares the two Strings to determine their relative ordering.
| string1 | the first String to compare |
|---|---|
| string2 | the second String to compare |
Compares the two objects to determine their relative ordering. The objects must be Strings.
| object1 | the first String to compare |
|---|---|
| object2 | the second String to compare |
| ClassCastException | when the objects are not Strings |
|---|
Compares the two Strings using the collation rules to determine if they are equal.
| string1 | the first String to compare |
|---|---|
| string2 | the second String to compare |
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.
| object | the object to compare with this object |
|---|
Gets the list of installed Locales which support Collator.
Returns a CollationKey for the specified String for this Collator with the current decomposition rule and strength value.
| string | the collation key. |
|---|
Returns the decomposition rule for this Collator.
Returns a Collator instance which is appropriate for the default Locale.
Returns a Collator instance which is appropriate for the specified Locale.
| locale | the Locale |
|---|
Returns the strength value for this Collator.
Returns an integer hash code for the receiver. Objects which are equal answer the same value for this method.
Sets the decomposition rule for this Collator.
| value | the decomposition rule, either NO_DECOMPOSITION, CANONICAL_DECOMPOSITION or FULL_DECOMPOSITION |
|---|
| IllegalArgumentException | when the decomposition rule is not valid |
|---|
Sets the strength value for this Collator.
| value | the strength value, either PRIMARY, SECONDARY, TERTIARY, or IDENTICAL |
|---|
| IllegalArgumentException | when the strength value is not valid |
|---|