Package org.h2.value
Class CompareModeIcu4J
java.lang.Object
org.h2.value.CompareMode
org.h2.value.CompareModeIcu4J
- All Implemented Interfaces:
Comparator<Value>
An implementation of CompareMode that uses the ICU4J Collator.
-
Field Summary
Fields inherited from class org.h2.value.CompareMode
CHARSET, DEFAULT, ICU4J, OFF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareString(String a, String b, boolean ignoreCase) Compare two strings.booleanequalsChars(String a, int ai, String b, int bi, boolean ignoreCase) Compare two characters in a string.Methods inherited from class org.h2.value.CompareMode
compare, equals, getCollationLocales, getCollator, getInstance, getName, getName, getStrength, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CompareModeIcu4J
-
-
Method Details
-
compareString
Description copied from class:CompareModeCompare two strings.- Overrides:
compareStringin classCompareMode- Parameters:
a- the first stringb- the second stringignoreCase- true if a case-insensitive comparison should be made- Returns:
- -1 if the first string is 'smaller', 1 if the second string is smaller, and 0 if they are equal
-
equalsChars
Description copied from class:CompareModeCompare two characters in a string.- Overrides:
equalsCharsin classCompareMode- Parameters:
a- the first stringai- the character index in the first stringb- the second stringbi- the character index in the second stringignoreCase- true if a case-insensitive comparison should be made- Returns:
- true if the characters are equals
-