|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.panter.li.bi.util.ArgumentTool
public final class ArgumentTool
Method Summary | ||
---|---|---|
static boolean |
isNullOrEmpty(String arg)
Determines whether the given argument is null or the empty string. |
|
static boolean |
isNullOrEmptyWhenTrimmed(String arg)
Determines whether the given argument is null or the empty string when it is trimmed of whitespace. |
|
static String |
nonEmptyArgument(String arg)
Returns the given string after checking it is not null and not empty. |
|
static String |
nonEmptyTrimmedArgument(String arg)
Returns the given string after checking it is not null and not empty after trimming it. |
|
static
|
nonNullArgument(T arg)
Returns the given argument after checking it is not null. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T nonNullArgument(T arg)
arg
- the argument to check
IllegalArgumentException
- in case the given argument is nullpublic static String nonEmptyArgument(String arg)
arg
- the argument to check
IllegalArgumentException
- in case the given argument is null or of zero lengthpublic static String nonEmptyTrimmedArgument(String arg)
arg
- the argument to check
IllegalArgumentException
- in case the given argument is null or of zero length after trimming itpublic static boolean isNullOrEmpty(String arg)
arg
- the argument to check
public static boolean isNullOrEmptyWhenTrimmed(String arg)
arg
- the argument to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |