public enum NullPolicy extends Enum<NullPolicy>
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.
| Enum Constant and Description |
|---|
ALL
Returns null if and only if all of the arguments are null;
If all of the arguments are false return false otherwise true.
|
ANY
If any of the arguments are null, return null.
|
ARG0
If the first argument is null, return null.
|
NONE |
SEMI_STRICT
Returns null if one of the arguments is null, and possibly other times.
|
STRICT
Returns null if and only if one of the arguments are null.
|
| Modifier and Type | Method and Description |
|---|---|
static NullPolicy |
valueOf(String name)
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.
|
public static final NullPolicy ALL
public static final NullPolicy STRICT
public static final NullPolicy SEMI_STRICT
public static final NullPolicy ANY
public static final NullPolicy ARG0
public static final NullPolicy NONE
public static NullPolicy[] values()
for (NullPolicy c : NullPolicy.values()) System.out.println(c);
public static NullPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.