public class ParamChecks
extends java.lang.Object
| Constructor and Description |
|---|
ParamChecks() |
| Modifier and Type | Method and Description |
|---|---|
static void |
nullNotPermitted(java.lang.Object param,
java.lang.String name)
Throws an
IllegalArgumentException if the supplied
param is null. |
static void |
requireNonNegative(int value,
java.lang.String name)
Throws an
IllegalArgumentException if value is negative. |
public static void nullNotPermitted(java.lang.Object param,
java.lang.String name)
IllegalArgumentException if the supplied
param is null.param - the parameter to check (null permitted).name - the name of the parameter (to use in the exception message
if param is null).java.lang.IllegalArgumentException - if param is
null.public static void requireNonNegative(int value,
java.lang.String name)
IllegalArgumentException if value is negative.value - the value.name - the parameter name (for use in the exception message).