Package org.jfree.chart.util
Class ParamChecks
- java.lang.Object
-
- org.jfree.chart.util.ParamChecks
-
public class ParamChecks extends Object
A utility class for checking parameters.- Since:
- 1.0.14
-
-
Constructor Summary
Constructors Constructor Description ParamChecks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
nullNotPermitted(Object param, String name)
Throws anIllegalArgumentException
if the suppliedparam
isnull
.static void
requireNonNegative(int value, String name)
Throws anIllegalArgumentException
ifvalue
is negative.
-
-
-
Method Detail
-
nullNotPermitted
public static void nullNotPermitted(Object param, String name)
Throws anIllegalArgumentException
if the suppliedparam
isnull
.- Parameters:
param
- the parameter to check (null
permitted).name
- the name of the parameter (to use in the exception message ifparam
isnull
).- Throws:
IllegalArgumentException
- ifparam
isnull
.- Since:
- 1.0.14
-
requireNonNegative
public static void requireNonNegative(int value, String name)
Throws anIllegalArgumentException
ifvalue
is negative.- Parameters:
value
- the value.name
- the parameter name (for use in the exception message).- Since:
- 1.0.18
-
-