public class OSXCollator
extends java.text.Collator
If we wanted to match the OS X collation rules exactly, we would have to implement the rules for all languages supported by Mac OS X and Java. To reduce the amount of work needed for implementing these rules, the OSXCollator changes the collation rules returned by java.text.Collator.getInstance() to do the following:
Constructor and Description |
---|
OSXCollator()
Creates a new instance.
|
OSXCollator(java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.String source,
java.lang.String target) |
boolean |
equals(java.lang.Object o) |
java.text.CollationKey |
getCollationKey(java.lang.String source) |
int |
hashCode() |
clone, compare, equals, getAvailableLocales, getDecomposition, getInstance, getInstance, getStrength, setDecomposition, setStrength
public OSXCollator()
public OSXCollator(java.util.Locale locale)
public int compare(java.lang.String source, java.lang.String target)
compare
in class java.text.Collator
public java.text.CollationKey getCollationKey(java.lang.String source)
getCollationKey
in class java.text.Collator
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<java.lang.Object>
equals
in class java.text.Collator
public int hashCode()
hashCode
in class java.text.Collator