public enum NullPolicy extends java.lang.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 |
---|
AND
If any of the arguments are false, result is false; else if any
arguments are null, result is null; else true.
|
ANY
If any of the arguments are null, return null.
|
ARG0
If the first argument is null, return null.
|
NONE |
NOT
If any argument is true, result is false; else if any argument is null,
result is null; else true.
|
OR
If any of the arguments are true, result is true; else if any
arguments are null, result is null; else false.
|
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(java.lang.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 STRICT
public static final NullPolicy SEMI_STRICT
public static final NullPolicy ANY
public static final NullPolicy ARG0
public static final NullPolicy AND
public static final NullPolicy OR
public static final NullPolicy NOT
public static final NullPolicy NONE
public static NullPolicy[] values()
for (NullPolicy c : NullPolicy.values()) System.out.println(c);
public static NullPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.