|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.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()
Returns 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 s,
String s1)
|
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 s)
|
int |
getDecomposition()
Returns the decomposition rule for this Collator. |
static Collator |
getInstance()
Returns a Collator instance which is appropriate for the default Locale. |
static Collator |
getInstance(Locale locale)
Returns a Collator instance which is appropriate for the specified Locale. |
int |
getStrength()
Returns the strength value for this Collator. |
abstract int |
hashCode()
Returns 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 ObjectCloneable
public int compare(Object object1,
Object object2)
compare in interface Comparatorobject1 - the first String to compareobject2 - the second String to compare
ClassCastException - when the objects are not Strings
public abstract int compare(String s,
String s1)
public boolean equals(Object object)
equals in interface Comparatorequals in class Objectobject - 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 s)
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 Objectequals(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
|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||