Package gnu.xquery.util
Class NamedCollator
- java.lang.Object
-
- java.text.Collator
-
- gnu.xquery.util.NamedCollator
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Comparator<Object>
public class NamedCollator extends Collator implements Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NamedCollatorcodepointCollationstatic StringUNICODE_CODEPOINT_COLLATION-
Fields inherited from class java.text.Collator
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
-
-
Constructor Summary
Constructors Constructor Description NamedCollator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcodepointCompare(String str1, String str2)Compares two strings lexicographically by codepoint.intcompare(String str1, String str2)static NamedCollatorfind(String name)CollationKeygetCollationKey(String source)StringgetName()inthashCode()static NamedCollatormake(String name)voidreadExternal(ObjectInput in)voidresolve()voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.text.Collator
clone, compare, equals, equals, getAvailableLocales, getDecomposition, getInstance, getInstance, getStrength, setDecomposition, setStrength
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
UNICODE_CODEPOINT_COLLATION
public static final String UNICODE_CODEPOINT_COLLATION
- See Also:
- Constant Field Values
-
codepointCollation
public static final NamedCollator codepointCollation
-
-
Method Detail
-
make
public static NamedCollator make(String name)
-
getName
public String getName()
-
find
public static NamedCollator find(String name)
-
resolve
public void resolve()
-
codepointCompare
public static int codepointCompare(String str1, String str2)
Compares two strings lexicographically by codepoint. Same asString.compareTobut handles surrogate characters.- Returns:
- -1, 0, or 1 depending on their relative order.
-
getCollationKey
public CollationKey getCollationKey(String source)
- Specified by:
getCollationKeyin classCollator
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-