public class ArgumentChecker
extends java.lang.Object
Constructor and Description |
---|
ArgumentChecker() |
Modifier and Type | Method and Description |
---|---|
static void |
assertIsInRangeExclusive(java.lang.String argument,
double value,
double lowerBound,
double upperBound)
Asserts that the given argument is in the given range, exclusive.
|
static void |
assertIsInRangeInclusive(java.lang.String argument,
double value,
double lowerBound,
double upperBound)
Asserts that the given argument is in the given range, inclusive.
|
static void |
assertIsNonNegative(java.lang.String argument,
double value)
Asserts that the given argument is non-negative (>=0.0).
|
static void |
assertIsNonNegative(java.lang.String argument,
int value)
Asserts that the given argument is non-negative (>=0.0).
|
static void |
assertIsNonNegative(java.lang.String argument,
long value)
Asserts that the given argument is non-negative (>=0.0).
|
static void |
assertIsNotNull(java.lang.String argument,
java.lang.Object value)
Asserts that the given value is not null.
|
static void |
assertIsPositive(java.lang.String argument,
double value)
Asserts the given value is positive (> 0.0).
|
static void |
assertIsPositive(java.lang.String argument,
int value)
Asserts the given value is positive (> 0).
|
static void |
assertIsPositive(java.lang.String argument,
long value)
Asserts the given value is positive (> 0).
|
public static void assertIsNotNull(java.lang.String argument, java.lang.Object value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsPositive(java.lang.String argument, int value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsPositive(java.lang.String argument, long value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsPositive(java.lang.String argument, double value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsNonNegative(java.lang.String argument, int value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsNonNegative(java.lang.String argument, long value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsNonNegative(java.lang.String argument, double value)
argument
- The name of the argument.value
- The value of the argument.public static void assertIsInRangeInclusive(java.lang.String argument, double value, double lowerBound, double upperBound)
argument
- The name of the argument.value
- The value of the argument.lowerBound
- The lower bound of the value (inclusive).upperBound
- The upper bound of the value (inclusive).public static void assertIsInRangeExclusive(java.lang.String argument, double value, double lowerBound, double upperBound)
argument
- The name of the argument.value
- The value of the argument.lowerBound
- The lower bound of the value (exclusive).upperBound
- The upper bound of the value (exclusive).