Package org.h2.value
Class CharsetCollator
java.lang.Object
java.text.Collator
org.h2.value.CharsetCollator
- All Implemented Interfaces:
Cloneable
,Comparator<Object>
The charset collator sorts strings according to the order in the given charset.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Charset
(package private) static final Comparator
<byte[]> The comparator used to compare byte arrays.Fields inherited from class java.text.Collator
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCollationKey
(String source) int
hashCode()
(package private) byte[]
Convert the source to bytes, using the character set.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
-
COMPARATOR
The comparator used to compare byte arrays. -
charset
-
-
Constructor Details
-
CharsetCollator
-
-
Method Details
-
getCharset
-
compare
-
toBytes
Convert the source to bytes, using the character set.- Parameters:
source
- the source- Returns:
- the bytes
-
getCollationKey
- Specified by:
getCollationKey
in classCollator
-
hashCode
public int hashCode()
-