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 intcodepointCompare(String str1, String str2) Compares two strings lexicographically by codepoint.intstatic NamedCollatorgetCollationKey(String source) getName()inthashCode()static NamedCollatorvoidvoidresolve()voidMethods inherited from class java.text.Collator
clone, compare, equals, equals, getAvailableLocales, getDecomposition, getInstance, getInstance, getStrength, setDecomposition, setStrengthMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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.compareTobut handles surrogate characters.- Returns:
- -1, 0, or 1 depending on their relative order.
-
compare
-
getCollationKey
- Specified by:
getCollationKeyin classCollator
-
hashCode
public int hashCode() -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-