public class Arguments extends Object
Objects.requireNonNull(Object, String).| Constructor and Description |
|---|
Arguments() |
| Modifier and Type | Method and Description |
|---|---|
static void |
require(boolean condition,
String message)
Checks that the specified condition is fulfilled and throws a customized
IllegalArgumentException if it
is false. |
static void |
requireInRange(int number,
int min,
int max,
String message)
Checks that the specified number is within the specified minimum and maximum range (inclusively) and throws a
customized
IllegalArgumentException if not. |
public static void require(boolean condition,
String message)
IllegalArgumentException if it
is false.condition - condition which must be fulfilledmessage - detail message to be used in the event that a IllegalArgumentException is thrownpublic static void requireInRange(int number,
int min,
int max,
String message)
IllegalArgumentException if not.number - value to checkmin - minimum allowed valuemax - maximum allowed valuemessage - detail message to be used in the event that a IllegalArgumentException is thrownCopyright © 2015. All Rights Reserved.