|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.util.lang.Arguments
Arg
has been designed to be used from now on. It has the same methods as this one, but it returns the value passed in to check. This allows to do the check and an initialization (e.g. in a constructor) in one line. It also allows to check arguments if another constructor is called (such as in this()
and super()
). This class is planned to be removed with the release of version 2.0.
@Deprecated public final class Arguments
Utility class to check arguments.
Method Summary | |
---|---|
static void |
checkNotBlank(String name, String value) Deprecated. Checks if value is blank. |
static void |
checkNotBlank(String name, String value, String message) Deprecated. Checks if value is blank providing an additional message. |
static void |
checkNotBlankExceptNull(String name, String value) Deprecated. Checks if value is blank except null . |
static void |
checkNotBlankExceptNull(String name, String value, String message) Deprecated. Checks if value is blank except null providing an additional message. |
static void |
checkNotNull(String name, Object value) Deprecated. Checks if value is null . |
static void |
checkNotNull(String name, Object value, String message) Deprecated. 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 |