|
Final | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.Collator
public abstract class Collator
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 | |
---|---|
static int |
CANONICAL_DECOMPOSITION
Constant used to specify the decomposition rule. |
static int |
FULL_DECOMPOSITION
Constant used to specify the decomposition rule. |
static int |
IDENTICAL
Constant used to specify the collation strength. |
static int |
NO_DECOMPOSITION
Constant used to specify the decomposition rule. |
static int |
PRIMARY
Constant used to specify the collation strength. |
static int |
SECONDARY
Constant used to specify the collation strength. |
static int |
TERTIARY
Constant used to specify the collation strength. |
Constructor Summary | |
---|---|
protected |
Collator()
Constructs a new instance of this Collator. |
Method Summary | |
---|---|
Object |
clone()
Answers a new Collator with the same decomposition rule and strength value as this Collator. |
int |
compare(Object object1,
Object object2)
Compares the two objects to determine their relative ordering. |
abstract int |
compare(String string1,
String string2)
Compares the two Strings to determine their relative ordering. |
boolean |
equals(Object object)
Compares the specified object to this Collator and answer if they are equal. |
boolean |
equals(String string1,
String string2)
Compares the two Strings using the collation rules to determine if they are equal. |
static Locale[] |
getAvailableLocales()
Gets the list of installed Locales which support Collator. |
abstract CollationKey |
getCollationKey(String string)
Answers a CollationKey for the specified String for this Collator with the current decomposition rule and stength value. |
int |
getDecomposition()
Answers the decomposition rule for this Collator. |
static Collator |
getInstance()
Answers a Collator instance which is appropriate for the default Locale. |
static Collator |
getInstance(Locale locale)
Answers a Collator instance which is appropriate for the specified Locale. |
int |
getStrength()
Answers the strength value for this Collator. |
abstract int |
hashCode()
Answers an integer hash code for the receiver. |
void |
setDecomposition(int value)
Sets the decomposition rule for this Collator. |
void |
setStrength(int value)
Sets the strength value for this Collator. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_DECOMPOSITION
public static final int CANONICAL_DECOMPOSITION
public static final int FULL_DECOMPOSITION
public static final int PRIMARY
public static final int SECONDARY
public static final int TERTIARY
public static final int IDENTICAL
Constructor Detail |
---|
protected Collator()
Method Detail |
---|
public Object clone()
clone
in class Object
Cloneable
public int compare(Object object1, Object object2)
compare
in interface Comparator
object1
- the first String to compareobject2
- the second String to compare
ClassCastException
- when the objects are not Stringspublic abstract int compare(String string1, String string2)
string1
- the first String to comparestring2
- the second String to compare
public boolean equals(Object object)
equals
in interface Comparator
equals
in class Object
object
- the object to compare with this object
hashCode()
public boolean equals(String string1, String string2)
string1
- the first String to comparestring2
- the second String to compare
public static Locale[] getAvailableLocales()
public abstract CollationKey getCollationKey(String string)
public int getDecomposition()
public static Collator getInstance()
public static Collator getInstance(Locale locale)
locale
- the Locale
public int getStrength()
public abstract int hashCode()
hashCode
in class Object
equals(Object)
,
equals(String, String)
public void setDecomposition(int value)
value
- the decomposition rule, either NO_DECOMPOSITION, CANONICAL_DECOMPOSITION
or FULL_DECOMPOSITION
IllegalArgumentException
- when the decomposition rule is not validpublic void setStrength(int value)
value
- the strength value, either PRIMARY, SECONDARY, TERTIARY, or IDENTICAL
IllegalArgumentException
- when the strength value is not valid
|
Final | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |