Package org.h2.value

# Class CharsetCollator

java.lang.Object
java.text.Collator
org.h2.value.CharsetCollator

All Implemented Interfaces:
  `Cloneable`, `Comparator<Object>`

public class CharsetCollator extends Collator
The charset collator sorts strings according to the order in the given charset.

## Field Summary

### Fields inherited from class java.text.Collator

`CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY`

## Constructor Summary

Constructors
Constructor
Description
`CharsetCollator(Charset charset)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(String source, String target)`
`Charset`
`getCharset()`
`CollationKey`
`getCollationKey(String source)`
`int`
`hashCode()`

### 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`

## Constructor Details

### CharsetCollator

public CharsetCollator(Charset charset)

## Method Details

### getCharset

public Charset getCharset()

### compare

public int compare(String source, String target)

Specified by:
  `compare` in class `Collator`

### getCollationKey

public CollationKey getCollationKey(String source)

Specified by:
  `getCollationKey` in class `Collator`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in class `Collator`