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 NamedCollator
codepointCollation
static String
UNICODE_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 int
codepointCompare(String str1, String str2)
Compares two strings lexicographically by codepoint.int
compare(String str1, String str2)
static NamedCollator
find(String name)
CollationKey
getCollationKey(String source)
String
getName()
int
hashCode()
static NamedCollator
make(String name)
void
readExternal(ObjectInput in)
void
resolve()
void
writeExternal(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.compareTo
but handles surrogate characters.- Returns:
- -1, 0, or 1 depending on their relative order.
-
getCollationKey
public CollationKey getCollationKey(String source)
- Specified by:
getCollationKey
in classCollator
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-