Package org.h2.value
Class CharsetCollator
- java.lang.Object
-
- java.text.Collator
-
- org.h2.value.CharsetCollator
-
- All Implemented Interfaces:
java.lang.Cloneable,java.util.Comparator<java.lang.Object>
public class CharsetCollator extends java.text.CollatorThe charset collator sorts strings according to the order in the given charset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classCharsetCollator.CharsetCollationKey
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.Charsetcharset(package private) static java.util.Comparator<byte[]>COMPARATORThe comparator used to compare byte arrays.
-
Constructor Summary
Constructors Constructor Description CharsetCollator(java.nio.charset.Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.String source, java.lang.String target)java.nio.charset.CharsetgetCharset()java.text.CollationKeygetCollationKey(java.lang.String source)inthashCode()(package private) byte[]toBytes(java.lang.String source)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
-
-
-
-
Method Detail
-
getCharset
public java.nio.charset.Charset getCharset()
-
compare
public int compare(java.lang.String source, java.lang.String target)- Specified by:
comparein classjava.text.Collator
-
toBytes
byte[] toBytes(java.lang.String source)
Convert the source to bytes, using the character set.- Parameters:
source- the source- Returns:
- the bytes
-
getCollationKey
public java.text.CollationKey getCollationKey(java.lang.String source)
- Specified by:
getCollationKeyin classjava.text.Collator
-
hashCode
public int hashCode()
- Specified by:
hashCodein classjava.text.Collator
-
-