public enum Nullity extends Enum<Nullity>
Nullity indicates the intended handling of null values
that are added to a data structure.| Enum Constant and Description |
|---|
ALLOW
A null should be allowed.
|
IGNORE
A null should be ignored.
|
REJECT
A null should be rejected.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_POSITION
Constant to indicate, that a null doesn't originate from an
array or
Iterable. |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
proceedAdd(String what,
int position)
Returns whether to allow adding a null value to a data
structure.
|
abstract boolean |
proceedReplace(String what,
int position)
Returns whether to allow replacing a non-null value with a
null value.
|
static Nullity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Nullity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Nullity ALLOW
public static final Nullity IGNORE
public static final Nullity REJECT
public static final int NO_POSITION
Iterable.public static Nullity[] values()
for (Nullity c : Nullity.values()) System.out.println(c);
public static Nullity 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 nullpublic abstract boolean proceedAdd(String what, int position) throws IllegalArgumentException
what - Textual representation of the kind of The position of the
null value to be used in an appropriate exception
message.position - The position of the null value inside of an array
or Iterable that is added to the data structure, or
NO_POSITION.IllegalArgumentException - If adding a null value to a data structure is
considered to be a failure.public abstract boolean proceedReplace(String what, int position) throws IllegalArgumentException
what - Textual representation of the kind of The position of the
null value to be used in an appropriate exception
message.position - The position of the null value inside of an array
or Iterable that is added to the data structure, or
NO_POSITION.IllegalArgumentException - If adding a null value to a data structure is
considered to be a failure.Copyright © 2016–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.