public static enum SerdeAssert.AssertThat extends java.lang.Enum<SerdeAssert.AssertThat>
An exception is thrown if the field does not satisfy the condition.
| Enum Constant and Description |
|---|
CUSTOM
Throw an exception if the field's value does not satisfy a custom condition,
defined by
SerdeAssert.customCheck(). |
NOT_EMPTY
Throw an exception if the field is empty.
|
NOT_NULL
Throw an exception if the field is null.
|
| Modifier and Type | Method and Description |
|---|---|
static SerdeAssert.AssertThat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SerdeAssert.AssertThat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SerdeAssert.AssertThat NOT_NULL
public static final SerdeAssert.AssertThat NOT_EMPTY
Determining whether an object is "empty" or not is done in a "logical" way
for common Java objects.
For instance, a CharSequence is empty is its length() is
zero, a Collection is empty if calling isEmpty() returns
true, etc.
As a last-resort try to implement the "is empty" check, reflection is used to
find and call the method boolean isEmpty() on the value.
public static final SerdeAssert.AssertThat CUSTOM
SerdeAssert.customCheck().public static SerdeAssert.AssertThat[] values()
for (SerdeAssert.AssertThat c : SerdeAssert.AssertThat.values()) System.out.println(c);
public static SerdeAssert.AssertThat 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 null