org.h2.value

## Class ExtTypeInfoEnum

- java.lang.Object
- - org.h2.value.ExtTypeInfo
  - - org.h2.value.ExtTypeInfoEnum

All Implemented Interfaces:
  HasSQL

    public final class ExtTypeInfoEnum
    extends ExtTypeInfo

Extended parameters of the ENUM data type.

### Field Summary

### Fields inherited from interface org.h2.util.HasSQL

`ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS`

### Constructor Summary

Constructors
Constructor and Description
`ExtTypeInfoEnum(java.lang.String[] enumerators)` Creates new instance of extended parameters of the ENUM data type.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals(java.lang.Object obj)`
`int` `getCount()` Get count of elements in enumeration.
`java.lang.String` `getEnumerator(int ordinal)` Returns an enumerator with specified 0-based ordinal value.
`static ExtTypeInfoEnum` `getEnumeratorsForBinaryOperation(Value left, Value right)` Returns enumerators for the two specified values for a binary operation.
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder, int sqlFlags)` Appends the SQL statement of this object to the specified builder.
`ValueEnum` `getValue(int ordinal, CastDataProvider provider)` Get ValueEnum instance for an ordinal.
`ValueEnum` `getValue(java.lang.String label, CastDataProvider provider)` Get ValueEnum instance for a label string.
`int` `hashCode()`

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

`toString`

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

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

### Methods inherited from interface org.h2.util.HasSQL

`getSQL, getTraceSQL`

### Constructor Detail

#### ExtTypeInfoEnum

    public ExtTypeInfoEnum(java.lang.String[] enumerators)

Creates new instance of extended parameters of the ENUM data type.

Parameters:
  `enumerators` - the enumerators. May not be modified by caller or this class.

### Method Detail

#### getEnumeratorsForBinaryOperation

    public static ExtTypeInfoEnum getEnumeratorsForBinaryOperation(Value left,
                                                                   Value right)

Returns enumerators for the two specified values for a binary operation.

Parameters:
  `left` - left (first) operand
  `right` - right (second) operand
Returns:
  enumerators from the left or the right value, or an empty array if both values do not have enumerators

#### getCount

    public int getCount()

Get count of elements in enumeration.

Returns:
  count of elements in enumeration

#### getEnumerator

    public java.lang.String getEnumerator(int ordinal)

Returns an enumerator with specified 0-based ordinal value.

Parameters:
  `ordinal` - ordinal value of an enumerator
Returns:
  the enumerator with specified ordinal value

#### getValue

    public ValueEnum getValue(int ordinal,
                              CastDataProvider provider)

Get ValueEnum instance for an ordinal.

Parameters:
  `ordinal` - ordinal value of an enum
  `provider` - the cast information provider
Returns:
  ValueEnum instance

#### getValue

    public ValueEnum getValue(java.lang.String label,
                              CastDataProvider provider)

Get ValueEnum instance for a label string.

Parameters:
  `label` - label string
  `provider` - the cast information provider
Returns:
  ValueEnum instance

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### equals

    public boolean equals(java.lang.Object obj)

Overrides:
  `equals` in class `java.lang.Object`

#### getSQL

    public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder,
                                          int sqlFlags)

Description copied from interface: `HasSQL`
Appends the SQL statement of this object to the specified builder.

Parameters:
  `builder` - string builder
  `sqlFlags` - formatting flags
Returns:
  the specified string builder