java.lang.Object
org.jfree.svg.util.Args
A utility class that performs checks for method argument validity.
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic voidarrayMustHaveLength(int length, boolean[] array, String ref) Checks an array to ensure it has the correct length and throws anIllegalArgumentExceptionif it does not.static voidarrayMustHaveLength(int length, double[] array, String ref) Checks an array to ensure it has the correct length and throws anIllegalArgumentExceptionif it does not.static voidnullNotPermitted(Object obj, String ref) Checks that an argument is non-nulland throws anIllegalArgumentExceptionotherwise.
Constructor Details
Args
private Args()Utility class, not intended for instantiation.
Method Details
nullNotPermitted
arrayMustHaveLength
Checks an array to ensure it has the correct length and throws anIllegalArgumentExceptionif it does not.- Parameters:
length- the required length.array- the array checked against the required lengthref- the text name of the array parameter (to include in the exception message).
arrayMustHaveLength
Checks an array to ensure it has the correct length and throws anIllegalArgumentExceptionif it does not.- Parameters:
length- the required length.array- the array to check the length ofref- the text name of the array parameter (to include in the exception message).