|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.text.Collator
|
+--dog.util.ObjectCollator
A class for comparing objects in a tree.
| Field Summary | |
protected java.text.Collator |
collator
|
protected boolean |
descending
|
| Fields inherited from class java.text.Collator |
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY |
| Constructor Summary | |
ObjectCollator()
Constructs a ObjectCollator for the default locale. |
|
ObjectCollator(java.util.Locale locale)
Constructs a ObjectCollator for the specified locale. |
|
| Method Summary | |
protected int |
applyDescending(int comparison)
Utility method to return the opposite of a comparison if descending is true. |
int |
compare(java.lang.Object source,
java.lang.Object target)
Compares the source object to the target object according to the collation rules for this Collator. |
int |
compare(java.lang.String source,
java.lang.String target)
Compares the source string to the target string according to the collation rules for this Collator. |
boolean |
equals(java.lang.Object other)
|
boolean |
equals(java.lang.String source,
java.lang.String target)
Convenience method for comparing the equality of two strings based on this Collator's collation rules. |
java.text.CollationKey |
getCollationKey(java.lang.String source)
Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. |
int |
getDecomposition()
Get the decomposition mode of this Collator. |
int |
getStrength()
Returns this Collator's strength property. |
int |
hashCode()
|
boolean |
isDescending()
Indicates whether this collator returns the opposite of any comparison. |
protected java.lang.StringBuffer |
paramString()
|
void |
setDecomposition(int decompositionMode)
Set the decomposition mode of this Collator. |
void |
setDescending(boolean descending)
Sets whether this collator returns the opposite of any comparison. |
void |
setStrength(int newStrength)
Sets this Collator's strength property. |
java.lang.String |
toString()
Provides a string description of this object. |
| Methods inherited from class java.text.Collator |
clone, getAvailableLocales, getInstance, getInstance |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.text.Collator collator
protected boolean descending
| Constructor Detail |
public ObjectCollator()
public ObjectCollator(java.util.Locale locale)
| Method Detail |
public boolean isDescending()
setDescending(boolean)public void setDescending(boolean descending)
descending - true if this collator returns the opposite of any comparison, false otherwisesetDescending(boolean)protected int applyDescending(int comparison)
public int compare(java.lang.String source,
java.lang.String target)
compare in class java.text.Collatorsource - the source string.target - the target string.CollationKey
public int compare(java.lang.Object source,
java.lang.Object target)
compare in class java.text.Collatorsource - the source object.target - the target object.public java.text.CollationKey getCollationKey(java.lang.String source)
getCollationKey in class java.text.Collatorsource - the string to be transformed into a collation key.CollationKey,
compare(java.lang.String, java.lang.String)
public boolean equals(java.lang.String source,
java.lang.String target)
equals in class java.text.Collatorsource - the source string to be compared with.target - the target string to be compared with.compare(java.lang.String, java.lang.String)public int getStrength()
getStrength in class java.text.CollatorsetStrength(int)public void setStrength(int newStrength)
setStrength in class java.text.CollatornewStrength - the new strength value.java.lang.IllegalArgumentException - if the new strength value is not one of PRIMARY, SECONDARY, TERTIARY or IDENTICAL.getStrength()public int getDecomposition()
getDecomposition in class java.text.CollatorsetDecomposition(int)public void setDecomposition(int decompositionMode)
setDecomposition in class java.text.CollatordecompositionMode - the new decomposition modejava.lang.IllegalArgumentException - if the given value is not a valid decomposition mode.getDecomposition()public int hashCode()
hashCode in class java.text.Collatorpublic boolean equals(java.lang.Object other)
equals in class java.text.Collatorpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.StringBuffer paramString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||