public final class MandatoryArgumentChecker extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
check(String argName,
Object argValue)
Checks if the specified argument value is
null. |
static void |
check(String argName1,
Object argValue1,
String argName2,
Object argValue2)
Checks if any of the two specified argument values is
null. |
static void |
check(String argName1,
Object argValue1,
String argName2,
Object argValue2,
String argName3,
Object argValue3)
Checks if any of the three specified argument values is
null. |
static void |
check(String argName1,
Object argValue1,
String argName2,
Object argValue2,
String argName3,
Object argValue3,
String argName4,
Object argValue4)
Checks if any of the four specified argument values is
null. |
public static void check(String argName, Object argValue) throws IllegalArgumentException
null. If it is
null, then an IllegalArgumentException is thrown.argName - the name of the argument, cannot be null.argValue - the value of the argument.IllegalArgumentException - if argValue == null.public static void check(String argName1, Object argValue1, String argName2, Object argValue2) throws IllegalArgumentException
null.
If at least one value is null, then an
IllegalArgumentException is thrown.argName1 - the name of the first argument, cannot be null.argValue1 - the value of the first argument.argName2 - the name of the second argument, cannot be null.argValue2 - the value of the second argument.IllegalArgumentException - if argValue1 == null || argValue2 == null.public static void check(String argName1, Object argValue1, String argName2, Object argValue2, String argName3, Object argValue3) throws IllegalArgumentException
null. If at least one value is null, then an
IllegalArgumentException is thrown.argName1 - the name of the first argument, cannot be null.argValue1 - the value of the first argument.argName2 - the name of the second argument, cannot be null.argValue2 - the value of the second argument.argName3 - the name of the third argument, cannot be null.argValue3 - the value of the third argument.IllegalArgumentException - if argValue1 == null
|| argValue2 == null
|| argValue3 == null.public static void check(String argName1, Object argValue1, String argName2, Object argValue2, String argName3, Object argValue3, String argName4, Object argValue4) throws IllegalArgumentException
null. If at least one value is null, then an
IllegalArgumentException is thrown.argName1 - the name of the first argument, cannot be null.argValue1 - the value of the first argument.argName2 - the name of the second argument, cannot be null.argValue2 - the value of the second argument.argName3 - the name of the third argument, cannot be null.argValue3 - the value of the third argument.argName4 - the name of the fourth argument, cannot be null.argValue4 - the value of the fourth argument.IllegalArgumentException - if argValue1 == null || argValue2 == null
|| argValue3 == null || argValue4 == null.See http://www.xins.org/.