Enum NonNullableExpression.NullStrategy
- java.lang.Object
-
- java.lang.Enum<NonNullableExpression.NullStrategy>
-
- com.speedment.runtime.compute.expression.NonNullableExpression.NullStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<NonNullableExpression.NullStrategy>
- Enclosing interface:
- NonNullableExpression<T,INNER extends Expression<T>>
public static enum NonNullableExpression.NullStrategy extends Enum<NonNullableExpression.NullStrategy>
The strategies possible when dealing withnull-values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLY_DEFAULT_METHODTHROW_EXCEPTIONUSE_DEFAULT_VALUEWhenever theinnerexpression returns anullvalue, a specific constant value will be returned by this expression.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NonNullableExpression.NullStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static NonNullableExpression.NullStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USE_DEFAULT_VALUE
public static final NonNullableExpression.NullStrategy USE_DEFAULT_VALUE
-
APPLY_DEFAULT_METHOD
public static final NonNullableExpression.NullStrategy APPLY_DEFAULT_METHOD
Whenever theinnerexpression returns anullvalue, theotherexpression will be invoked to determine the value instead. If this strategy is used, then the class should also implementOrElseGetExpression.
-
THROW_EXCEPTION
public static final NonNullableExpression.NullStrategy THROW_EXCEPTION
Whenever theinnerexpression returns anullvalue, aNullPointerExceptionis thrown. If this strategy is used, then the class should also implementOrElseThrowExpression.
-
-
Method Detail
-
values
public static NonNullableExpression.NullStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NonNullableExpression.NullStrategy c : NonNullableExpression.NullStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NonNullableExpression.NullStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-