Enum NullPolicy
- All Implemented Interfaces:
Serializable
,Comparable<NullPolicy>
,Constable
Describes when a function/operator will return null.
STRICT and ANY are similar. STRICT says f(a0, a1) will NEVER return null if a0 and a1 are not null. This means that we can check whether f returns null just by checking its arguments. Use STRICT in preference to ANY whenever possible.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionReturns null if and only if all of the arguments are null; If all of the arguments are false return false otherwise true.If any of the arguments are null, return null.If the first argument is null, return null.Returns null if one of the arguments is null, and possibly other times.Returns null if and only if one of the arguments are null. -
Method Summary
Modifier and TypeMethodDescriptionstatic NullPolicy
Returns the enum constant of this type with the specified name.static NullPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALL
Returns null if and only if all of the arguments are null; If all of the arguments are false return false otherwise true. -
STRICT
Returns null if and only if one of the arguments are null. -
SEMI_STRICT
Returns null if one of the arguments is null, and possibly other times. -
ANY
If any of the arguments are null, return null. -
ARG0
If the first argument is null, return null. -
NONE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-