Package gnu.xquery.util
Class NamedCollator
java.lang.Object
java.text.Collator
gnu.xquery.util.NamedCollator
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,Comparator<Object>
- See Also:
-
Field Summary
FieldsFields inherited from class java.text.Collator
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
codepointCompare
(String str1, String str2) Compares two strings lexicographically by codepoint.int
static NamedCollator
getCollationKey
(String source) getName()
int
hashCode()
static NamedCollator
void
void
resolve()
void
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 Details
-
UNICODE_CODEPOINT_COLLATION
- See Also:
-
codepointCollation
-
-
Constructor Details
-
NamedCollator
public NamedCollator()
-
-
Method Details
-
make
-
getName
-
find
-
resolve
public void resolve() -
codepointCompare
Compares two strings lexicographically by codepoint. Same asString.compareTo
but handles surrogate characters.- Returns:
- -1, 0, or 1 depending on their relative order.
-
compare
-
getCollationKey
- Specified by:
getCollationKey
in classCollator
-
hashCode
public int hashCode() -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-