Package org.h2.mode

# Enum Class DefaultNullOrdering

java.lang.Object
java.lang.Enum<DefaultNullOrdering>
org.h2.mode.DefaultNullOrdering

All Implemented Interfaces:
  `Serializable`, `Comparable<DefaultNullOrdering>`, `Constable`

public enum DefaultNullOrdering extends Enum<DefaultNullOrdering>
Default ordering of NULL values.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`FIRST`
NULL values are sorted before other values, no matter if ascending or descending order is used.
`HIGH`
NULL values are considered as larger than other values during sorting.
`LAST`
NULL values are sorted after other values, no matter if ascending or descending order is used.
`LOW`
NULL values are considered as smaller than other values during sorting.

## Method Summary

Modifier and Type
Method
Description
`int`
`addExplicitNullOrdering(int sortType)`
Returns a sort type bit mask with `SortOrder.NULLS_FIRST` or `SortOrder.NULLS_LAST` explicitly set
`int`
`compareNull(boolean aNull, int sortType)`
Compare two expressions where one of them is NULL.
`static DefaultNullOrdering`
`valueOf(int ordinal)`
Returns default ordering of NULL values for the specified ordinal number.
`static DefaultNullOrdering`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DefaultNullOrdering[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### LOW

public static final DefaultNullOrdering LOW
NULL values are considered as smaller than other values during sorting.

### HIGH

public static final DefaultNullOrdering HIGH
NULL values are considered as larger than other values during sorting.

### FIRST

public static final DefaultNullOrdering FIRST
NULL values are sorted before other values, no matter if ascending or descending order is used.

### LAST

public static final DefaultNullOrdering LAST
NULL values are sorted after other values, no matter if ascending or descending order is used.

## Method Details

### values

public static DefaultNullOrdering[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static DefaultNullOrdering valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### valueOf

public static DefaultNullOrdering valueOf(int ordinal)
Returns default ordering of NULL values for the specified ordinal number.

Parameters:
  `ordinal` - ordinal number
Returns:
  default ordering of NULL values for the specified ordinal number
See Also:
  - `Enum.ordinal()`

### addExplicitNullOrdering

public int addExplicitNullOrdering(int sortType)
Returns a sort type bit mask with `SortOrder.NULLS_FIRST` or `SortOrder.NULLS_LAST` explicitly set

Parameters:
  `sortType` - sort type bit mask
Returns:
  bit mask with `SortOrder.NULLS_FIRST` or `SortOrder.NULLS_LAST` explicitly set

### compareNull

public int compareNull(boolean aNull, int sortType)
Compare two expressions where one of them is NULL.

Parameters:
  `aNull` - whether the first expression is null
  `sortType` - the sort bit mask to use
Returns:
  the result of the comparison (-1 meaning the first expression should appear before the second, 0 if they are equal)