Package org.jfree.chart.util
Class Args
java.lang.Object
org.jfree.chart.util.Args
A utility class for checking method arguments.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidnullNotPermitted(Object param, String name) Throws anIllegalArgumentExceptionif the suppliedparamisnull.static voidrequireFinite(double value, String name) Checks the supplied value is finite (neither infinite nor NaN) and throws anIllegalArgumentExceptionif the requirement is not met.static voidrequireInRange(int value, String name, int lowerBound, int upperBound) Checks that the value falls within the specified range and, if it does not, throws anIllegalArgumentException.static voidrequireNonNegative(double value, String name) Throws anIllegalArgumentExceptionifvalueis negative.static voidrequireNonNegative(int value, String name) Throws anIllegalArgumentExceptionifvalueis negative. 
- 
Constructor Details
- 
Args
public Args() 
 - 
 - 
Method Details
- 
nullNotPermitted
Throws anIllegalArgumentExceptionif the suppliedparamisnull.- Parameters:
 param- the parameter to check (nullpermitted).name- the name of the parameter (to use in the exception message ifparamisnull).- Throws:
 IllegalArgumentException- ifparamisnull.
 - 
requireNonNegative
Throws anIllegalArgumentExceptionifvalueis negative.- Parameters:
 value- the value.name- the parameter name (for use in the exception message).
 - 
requireNonNegative
Throws anIllegalArgumentExceptionifvalueis negative.- Parameters:
 value- the value.name- the parameter name (for use in the exception message).
 - 
requireInRange
Checks that the value falls within the specified range and, if it does not, throws anIllegalArgumentException.- Parameters:
 value- the value.name- the parameter name.lowerBound- the lower bound of the permitted range.upperBound- the upper bound fo the permitted range.
 - 
requireFinite
Checks the supplied value is finite (neither infinite nor NaN) and throws anIllegalArgumentExceptionif the requirement is not met.- Parameters:
 value- the value.name- the parameter name (for use in the exception message).- Since:
 - 1.5.4
 
 
 -