public final class Arg
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.CharSequence> |
checkNotBlank(java.lang.String name,
T value)
Checks if
value is blank. |
static <T extends java.lang.CharSequence> |
checkNotBlank(java.lang.String name,
T value,
java.lang.String message)
Checks if
value is blank providing an additional message. |
static <T extends java.lang.CharSequence> |
checkNotBlankExceptNull(java.lang.String name,
T value)
Checks if
value is blank except null. |
static <T extends java.lang.CharSequence> |
checkNotBlankExceptNull(java.lang.String name,
T value,
java.lang.String message)
Checks if
value is blank except null providing an
additional message. |
static <T> T |
checkNotNull(java.lang.String name,
T value)
Checks if
value is null. |
static <T> T |
checkNotNull(java.lang.String name,
T value,
java.lang.String message)
Checks if
value is null providing an additional
message. |
public static <T> T checkNotNull(java.lang.String name,
T value)
throws java.lang.NullPointerException
value is null.T - the type of the argument to check.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not null.value.java.lang.NullPointerException - if value is null.public static <T> T checkNotNull(java.lang.String name,
T value,
java.lang.String message)
throws java.lang.NullPointerException
value is null providing an additional
message.T - the type of the argument to check.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not null.message - the message to pass to the exception as additional
information to the standard message being generated.value.java.lang.NullPointerException - if value is null.public static <T extends java.lang.CharSequence> T checkNotBlank(java.lang.String name,
T value)
throws NullArgumentException,
BlankArgumentException
value is blank.T - a character sequence like a String.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not blank.value.NullArgumentException - if value is null.BlankArgumentException - if value is blank.public static <T extends java.lang.CharSequence> T checkNotBlank(java.lang.String name,
T value,
java.lang.String message)
throws NullArgumentException,
BlankArgumentException
value is blank providing an additional message.T - a character sequence like a String.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not blank.message - the message to pass to the exception as additional
information to the standard message being generated.value.NullArgumentException - if value is null.BlankArgumentException - if value is blank.public static <T extends java.lang.CharSequence> T checkNotBlankExceptNull(java.lang.String name,
T value)
throws BlankExceptNullArgumentException
value is blank except null.T - a character sequence like a String.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not blank but may be
null.value.BlankExceptNullArgumentException - if value is blank and not
null.public static <T extends java.lang.CharSequence> T checkNotBlankExceptNull(java.lang.String name,
T value,
java.lang.String message)
throws BlankExceptNullArgumentException
value is blank except null providing an
additional message.T - a character sequence like a String.name - the name of the argument of error reporting. Not used if no
exception is thrown. May be null, although not
recommended.value - the value of the argument to check to be not blank but may be
null.message - the message to pass to the exception as additional
information to the standard message being generated.value.BlankExceptNullArgumentException - if value is blank and not
null.