org.h2.value

## Class ValueEnum

- java.lang.Object
- - org.h2.value.Value
  - - org.h2.value.ValueEnumBase
    - - org.h2.value.ValueEnum

    public class ValueEnum
    extends ValueEnumBase

### Nested Class Summary

### Nested classes/interfaces inherited from class org.h2.value.Value

`Value.ValueBlob, Value.ValueClob`

### Field Summary

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

`ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, ENUM, FLOAT, GEOMETRY, INT, JAVA_OBJECT, LONG, NULL, RESULT_SET, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TIMESTAMP_TZ, TYPE_COUNT, UNKNOWN, UUID`

### Method Summary

Methods
`static void` `check(java.lang.String[] enumerators)` Check for any violations, such as empty values, duplicate values.
`protected int` `compareSecure(Value v, CompareMode mode)` Compare the value with another value of the same type.
`static ValueEnum` `get(java.lang.String[] enumerators, Value value)` Create an ENUM value from the provided enumerators and value.
`java.lang.String[]` `getEnumerators()`
`static boolean` `isValid(java.lang.String[] enumerators, Value value)` Evaluates whether a valid ENUM can be constructed from the provided enumerators and value.

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

`add, divide, equals, get, getDisplaySize, getInt, getLong, getObject, getPrecision, getSignum, getSQL, getString, getType, hashCode, modulus, multiply, set, subtract`

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

`checkPrecision, clearCache, compareTo, compareTypeSafe, convertPrecision, convertScale, convertTo, copy, copyToResult, copyToTemp, getBigDecimal, getBoolean, getByte, getBytes, getBytesNoCopy, getDataHandler, getDate, getDouble, getFloat, getHigherOrder, getInputStream, getMemory, getReader, getResultSet, getScale, getShort, getSmall, getTableId, getTime, getTimestamp, getTraceSQL, isLinkedToTable, negate, remove, throwUnsupportedExceptionForType, toString`

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

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

### Method Detail

#### check

    public static final void check(java.lang.String[] enumerators)

Check for any violations, such as empty values, duplicate values.

Parameters:
  `enumerators` - the enumerators

#### compareSecure

    protected int compareSecure(Value v,
                    CompareMode mode)

Description copied from class: `Value`
Compare the value with another value of the same type.

Overrides:
  `compareSecure` in class `ValueEnumBase`
Parameters:
  `v` - the other value
  `mode` - the compare mode
Returns:
  0 if both values are equal, -1 if the other value is smaller, and 1 otherwise

#### get

    public static ValueEnum get(java.lang.String[] enumerators,
                Value value)

Create an ENUM value from the provided enumerators and value.

Parameters:
  `enumerators` - the enumerators
  `value` - a value
Returns:
  the ENUM value

#### getEnumerators

    public java.lang.String[] getEnumerators()

#### isValid

    public static boolean isValid(java.lang.String[] enumerators,
                  Value value)

Evaluates whether a valid ENUM can be constructed from the provided enumerators and value.

Parameters:
  `enumerators` - the enumerators
  `value` - the value
Returns:
  whether a valid ENUM can be constructed from the provided values