org.h2.value

## Class CompareModeIcu4J

- java.lang.Object
- - org.h2.value.CompareMode
  - - org.h2.value.CompareModeIcu4J

All Implemented Interfaces:
  java.util.Comparator<Value>

    public class CompareModeIcu4J
    extends CompareMode

An implementation of CompareMode that uses the ICU4J Collator.

### Field Summary

### Fields inherited from class org.h2.value.CompareMode

`CHARSET, DEFAULT, ICU4J, OFF, SIGNED, UNSIGNED`

### Constructor Summary

Constructors
`protected` `CompareModeIcu4J(java.lang.String name, int strength, boolean binaryUnsigned, boolean uuidUnsigned)`

### Method Summary

Methods
`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.

### Methods inherited from class org.h2.value.CompareMode

`compare, equals, getCollator, getInstance, getInstance, getName, getName, getStrength, hashCode, isBinaryUnsigned, isUuidUnsigned`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CompareModeIcu4J

    protected CompareModeIcu4J(java.lang.String name,
                    int strength,
                    boolean binaryUnsigned,
                    boolean uuidUnsigned)

### Method Detail

#### compareString

    public int compareString(java.lang.String a,
                    java.lang.String b,
                    boolean ignoreCase)

Description copied from class: `CompareMode`
Compare two strings.

Overrides:
  `compareString` in class `CompareMode`
Parameters:
  `a` - the first string
  `b` - the second string
  `ignoreCase` - 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

    public boolean equalsChars(java.lang.String a,
                      int ai,
                      java.lang.String b,
                      int bi,
                      boolean ignoreCase)

Description copied from class: `CompareMode`
Compare two characters in a string.

Overrides:
  `equalsChars` in class `CompareMode`
Parameters:
  `a` - the first string
  `ai` - the character index in the first string
  `b` - the second string
  `bi` - the character index in the second string
  `ignoreCase` - true if a case-insensitive comparison should be made
Returns:
  true if the characters are equals