|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.util.lang.Arguments
public final class Arguments
Utility class to check arguments.
Method Summary | |
---|---|
static void |
checkNotBlank(String name, String value) Checks if value is blank. |
static void |
checkNotBlank(String name, String value, String message) Checks if value is blank providing an additional message. |
static void |
checkNotBlankExceptNull(String name, String value) Checks if value is blank except null . |
static void |
checkNotBlankExceptNull(String name, String value, String message) Checks if value is blank except null providing an additional message. |
static void |
checkNotNull(String name, Object value) Checks if value is null . |
static void |
checkNotNull(String name, Object value, String message) Checks if value is null providing an additional message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void checkNotNull(String name, Object value) throws NullPointerException
value
is
null
.
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
.
NullPointerException
- if
value
is
null
.
public static void checkNotNull(String name, Object value, String message) throws NullPointerException
value
is
null
providing an additional message.
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.
NullPointerException
- if
value
is
null
.
public static void checkNotBlank(String name, String value) throws BlankArgumentException
value
is blank.
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.
BlankArgumentException
- if
value
is blank.
public static void checkNotBlank(String name, String value, String message) throws BlankArgumentException
value
is blank providing an additional message.
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.
BlankArgumentException
- if
value
is blank.
public static void checkNotBlankExceptNull(String name, String value) throws BlankExceptNullArgumentException
value
is blank except
null
.
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
.
BlankExceptNullArgumentException
- if
value
is blank and not
null
.
public static void checkNotBlankExceptNull(String name, String value, String message) throws BlankExceptNullArgumentException
value
is blank except
null
providing an additional message.
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.
BlankExceptNullArgumentException
- if
value
is blank and not
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |