|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.value.CompareMode
public class CompareMode
Instances of this class can compare strings. Case sensitive and case insensitive comparison is supported, and comparison using a collator.
Field Summary | |
---|---|
static java.lang.String |
OFF
This constant means there is no collator set, and the default string comparison is to be used. |
Method Summary | |
---|---|
int |
compareString(java.lang.String a,
java.lang.String b,
boolean ignoreCase)
Compare two strings. |
boolean |
equalsChars(java.lang.String a,
int ai,
java.lang.String b,
int bi,
boolean ignoreCase)
Compare two characters in a string. |
static java.text.Collator |
getCollator(java.lang.String name)
Get the collator object for the given language name or language / country combination. |
static CompareMode |
getInstance(java.lang.String name,
int strength)
Create a new compare mode with the given collator and strength. |
java.lang.String |
getName()
|
static java.lang.String |
getName(java.util.Locale l)
Get the collation name. |
int |
getStrength()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OFF
Method Detail |
---|
public static CompareMode getInstance(java.lang.String name, int strength)
name
- the collation name or nullstrength
- the collation strength
public boolean equalsChars(java.lang.String a, int ai, java.lang.String b, int bi, boolean ignoreCase)
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
public int compareString(java.lang.String a, java.lang.String b, boolean ignoreCase)
a
- the first stringb
- the second stringignoreCase
- true if a case-insensitive comparison should be made
public static java.lang.String getName(java.util.Locale l)
l
- the locale
public static java.text.Collator getCollator(java.lang.String name)
name
- the language name
public java.lang.String getName()
public int getStrength()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |