public class Args extends Object
Constructor and Description |
---|
Args() |
Modifier and Type | Method and Description |
---|---|
static void |
nullNotPermitted(Object param,
String name)
Throws an
IllegalArgumentException if the supplied
param is null . |
static void |
requireInRange(int value,
String name,
int lowerBound,
int upperBound)
Checks that the value falls within the specified range and, if it does
not, throws an
IllegalArgumentException . |
static void |
requireNonNegative(int value,
String name)
Throws an
IllegalArgumentException if value is negative. |
public static void nullNotPermitted(Object param, 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
).IllegalArgumentException
- if param
is
null
.public static void requireNonNegative(int value, String name)
IllegalArgumentException
if value
is negative.value
- the value.name
- the parameter name (for use in the exception message).public static void requireInRange(int value, String name, int lowerBound, int upperBound)
IllegalArgumentException
.value
- the value.name
- the parameter name.lowerBound
- the lower bound of the permitted range.upperBound
- the upper bound fo the permitted range.Copyright © 2001–2017 JFree.org. All rights reserved.