public final class Argument extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte |
checkGreaterThan(byte value,
byte number)
|
static byte |
checkGreaterThan(byte value,
byte number,
String name)
|
static char |
checkGreaterThan(char value,
char number)
|
static char |
checkGreaterThan(char value,
char number,
String name)
|
static double |
checkGreaterThan(double value,
double number)
|
static double |
checkGreaterThan(double value,
double number,
double epsilon)
|
static double |
checkGreaterThan(double value,
double number,
double epsilon,
String name)
|
static double |
checkGreaterThan(double value,
double number,
String name)
|
static float |
checkGreaterThan(float value,
float number)
|
static float |
checkGreaterThan(float value,
float number,
float epsilon)
|
static float |
checkGreaterThan(float value,
float number,
float epsilon,
String name)
|
static float |
checkGreaterThan(float value,
float number,
String name)
|
static int |
checkGreaterThan(int value,
int number)
|
static int |
checkGreaterThan(int value,
int number,
String name)
|
static long |
checkGreaterThan(long value,
long number)
|
static long |
checkGreaterThan(long value,
long number,
String name)
|
static short |
checkGreaterThan(short value,
short number)
|
static short |
checkGreaterThan(short value,
short number,
String name)
|
static byte |
checkGreaterThanOrEqual(byte value,
byte number)
|
static byte |
checkGreaterThanOrEqual(byte value,
byte number,
String name)
|
static char |
checkGreaterThanOrEqual(char value,
char number)
|
static char |
checkGreaterThanOrEqual(char value,
char number,
String name)
|
static double |
checkGreaterThanOrEqual(double value,
double number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static double |
checkGreaterThanOrEqual(double value,
double number,
double epsilon)
|
static double |
checkGreaterThanOrEqual(double value,
double number,
double epsilon,
String name)
|
static double |
checkGreaterThanOrEqual(double value,
double number,
String name)
|
static float |
checkGreaterThanOrEqual(float value,
float number)
|
static float |
checkGreaterThanOrEqual(float value,
float number,
float epsilon)
|
static float |
checkGreaterThanOrEqual(float value,
float number,
float epsilon,
String name)
|
static float |
checkGreaterThanOrEqual(float value,
float number,
String name)
|
static int |
checkGreaterThanOrEqual(int value,
int number)
|
static int |
checkGreaterThanOrEqual(int value,
int number,
String name)
|
static long |
checkGreaterThanOrEqual(long value,
long number)
|
static long |
checkGreaterThanOrEqual(long value,
long number,
String name)
|
static short |
checkGreaterThanOrEqual(short value,
short number)
|
static short |
checkGreaterThanOrEqual(short value,
short number,
String name)
|
static byte |
checkInsideRange(byte value,
byte min,
byte max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static byte |
checkInsideRange(byte value,
byte min,
byte max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static char |
checkInsideRange(char value,
char min,
char max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static char |
checkInsideRange(char value,
char min,
char max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static double |
checkInsideRange(double value,
double min,
double max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static double |
checkInsideRange(double value,
double min,
double max,
double epsilon)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static double |
checkInsideRange(double value,
double min,
double max,
double epsilon,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static double |
checkInsideRange(double value,
double min,
double max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static float |
checkInsideRange(float value,
float min,
float max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static float |
checkInsideRange(float value,
float min,
float max,
float epsilon)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static float |
checkInsideRange(float value,
float min,
float max,
float epsilon,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static float |
checkInsideRange(float value,
float min,
float max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static int |
checkInsideRange(int value,
int min,
int max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static int |
checkInsideRange(int value,
int min,
int max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static long |
checkInsideRange(long value,
long min,
long max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static long |
checkInsideRange(long value,
long min,
long max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static short |
checkInsideRange(short value,
short min,
short max)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static short |
checkInsideRange(short value,
short min,
short max,
String name)
Returns
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. |
static boolean[] |
checkLength(boolean[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static boolean[] |
checkLength(boolean[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static byte[] |
checkLength(byte[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static byte[] |
checkLength(byte[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static char[] |
checkLength(char[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static char[] |
checkLength(char[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static double[] |
checkLength(double[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static double[] |
checkLength(double[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static float[] |
checkLength(float[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static float[] |
checkLength(float[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static int[] |
checkLength(int[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static int[] |
checkLength(int[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static long[] |
checkLength(long[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static long[] |
checkLength(long[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static short[] |
checkLength(short[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static short[] |
checkLength(short[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static <T> T[] |
checkLength(T[] array,
int length)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static <T> T[] |
checkLength(T[] array,
int length,
String name)
Returns
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException. |
static byte |
checkLessThan(byte value,
byte number)
|
static byte |
checkLessThan(byte value,
byte number,
String name)
|
static char |
checkLessThan(char value,
char number)
|
static char |
checkLessThan(char value,
char number,
String name)
|
static double |
checkLessThan(double value,
double number)
|
static double |
checkLessThan(double value,
double number,
double epsilon)
|
static double |
checkLessThan(double value,
double number,
double epsilon,
String name)
|
static double |
checkLessThan(double value,
double number,
String name)
|
static float |
checkLessThan(float value,
float number)
|
static float |
checkLessThan(float value,
float number,
float epsilon)
|
static float |
checkLessThan(float value,
float number,
float epsilon,
String name)
|
static float |
checkLessThan(float value,
float number,
String name)
|
static int |
checkLessThan(int value,
int number)
|
static int |
checkLessThan(int value,
int number,
String name)
|
static long |
checkLessThan(long value,
long number)
|
static long |
checkLessThan(long value,
long number,
String name)
|
static short |
checkLessThan(short value,
short number)
|
static short |
checkLessThan(short value,
short number,
String name)
|
static byte |
checkLessThanOrEqual(byte value,
byte number)
|
static byte |
checkLessThanOrEqual(byte value,
byte number,
String name)
|
static char |
checkLessThanOrEqual(char value,
char number)
|
static char |
checkLessThanOrEqual(char value,
char number,
String name)
|
static double |
checkLessThanOrEqual(double value,
double number)
|
static double |
checkLessThanOrEqual(double value,
double number,
double epsilon)
|
static double |
checkLessThanOrEqual(double value,
double number,
double epsilon,
String name)
|
static double |
checkLessThanOrEqual(double value,
double number,
String name)
|
static float |
checkLessThanOrEqual(float value,
float number)
|
static float |
checkLessThanOrEqual(float value,
float number,
float epsilon)
|
static float |
checkLessThanOrEqual(float value,
float number,
float epsilon,
String name)
|
static float |
checkLessThanOrEqual(float value,
float number,
String name)
|
static int |
checkLessThanOrEqual(int value,
int number)
|
static int |
checkLessThanOrEqual(int value,
int number,
String name)
|
static long |
checkLessThanOrEqual(long value,
long number)
|
static long |
checkLessThanOrEqual(long value,
long number,
String name)
|
static short |
checkLessThanOrEqual(short value,
short number)
|
static short |
checkLessThanOrEqual(short value,
short number,
String name)
|
static byte |
checkNegative(byte value)
Returns
value if it is negative, which means less than 0. |
static byte |
checkNegative(byte value,
String name)
Returns
value if it is negative, which means less than 0. |
static double |
checkNegative(double value)
Returns
value if it is negative, which means less than 0. |
static double |
checkNegative(double value,
double epsilon)
Returns
value if it is negative, which means less than 0. |
static double |
checkNegative(double value,
double epsilon,
String name)
Returns
value if it is negative, which means less than 0. |
static double |
checkNegative(double value,
String name)
Returns
value if it is negative, which means less than 0. |
static float |
checkNegative(float value)
Returns
value if it is negative, which means less than 0. |
static float |
checkNegative(float value,
float epsilon)
Returns
value if it is negative, which means less than 0. |
static float |
checkNegative(float value,
float epsilon,
String name)
Returns
value if it is negative, which means less than 0. |
static float |
checkNegative(float value,
String name)
Returns
value if it is negative, which means less than 0. |
static int |
checkNegative(int value)
Returns
value if it is negative, which means less than 0. |
static int |
checkNegative(int value,
String name)
Returns
value if it is negative, which means less than 0. |
static long |
checkNegative(long value)
Returns
value if it is negative, which means less than 0. |
static long |
checkNegative(long value,
String name)
Returns
value if it is negative, which means less than 0. |
static short |
checkNegative(short value)
Returns
value if it is negative, which means less than 0. |
static short |
checkNegative(short value,
String name)
Returns
value if it is negative, which means less than 0. |
static <T> T |
checkNotNull(T value)
|
static <T> T |
checkNotNull(T value,
String name)
|
static byte |
checkPercent(byte value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static byte |
checkPercent(byte value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static double |
checkPercent(double value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static double |
checkPercent(double value,
double epsilon)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static double |
checkPercent(double value,
double epsilon,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static double |
checkPercent(double value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static float |
checkPercent(float value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static float |
checkPercent(float value,
float epsilon)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static float |
checkPercent(float value,
float epsilon,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static float |
checkPercent(float value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static int |
checkPercent(int value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static int |
checkPercent(int value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static long |
checkPercent(long value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static long |
checkPercent(long value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static short |
checkPercent(short value)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static short |
checkPercent(short value,
String name)
Returns
value if it is a valid percent, which means between 0
and 100 (inclusive). |
static byte |
checkPositive(byte value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static byte |
checkPositive(byte value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static double |
checkPositive(double value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static double |
checkPositive(double value,
double epsilon)
Returns
value if it is positive, which means greater than or
equal to 0. |
static double |
checkPositive(double value,
double epsilon,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static double |
checkPositive(double value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static float |
checkPositive(float value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static float |
checkPositive(float value,
float epsilon)
Returns
value if it is positive, which means greater than or
equal to 0. |
static float |
checkPositive(float value,
float epsilon,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static float |
checkPositive(float value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static int |
checkPositive(int value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static int |
checkPositive(int value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static long |
checkPositive(long value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static long |
checkPositive(long value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
static short |
checkPositive(short value)
Returns
value if it is positive, which means greater than or
equal to 0. |
static short |
checkPositive(short value,
String name)
Returns
value if it is positive, which means greater than or
equal to 0. |
public static <T> T checkNotNull(T value,
String name)
T - the type of the valuevalue - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static <T> T checkNotNull(T value)
T - the type of the valuevalue - the value to checkvaluepublic static byte checkGreaterThan(byte value,
byte number,
String name)
value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkGreaterThan(byte value,
byte number)
value - the value to checknumber - the number that value must be greater thanvaluepublic static short checkGreaterThan(short value,
short number,
String name)
value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkGreaterThan(short value,
short number)
value - the value to checknumber - the number that value must be greater thanvaluepublic static int checkGreaterThan(int value,
int number,
String name)
value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkGreaterThan(int value,
int number)
value - the value to checknumber - the number that value must be greater thanvaluepublic static long checkGreaterThan(long value,
long number,
String name)
value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkGreaterThan(long value,
long number)
value - the value to checknumber - the number that value must be greater thanvaluepublic static float checkGreaterThan(float value,
float number,
float epsilon,
String name)
value if it is greater than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThan(float, float, float)public static float checkGreaterThan(float value,
float number,
float epsilon)
value if it is greater than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.greaterThan(float, float, float)public static float checkGreaterThan(float value,
float number,
String name)
value if it is greater than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThan(float, float)public static float checkGreaterThan(float value,
float number)
value if it is greater than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be greater thanvalueFloatingPoint.greaterThan(float, float)public static double checkGreaterThan(double value,
double number,
double epsilon,
String name)
value if it is greater than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThan(double, double, double)public static double checkGreaterThan(double value,
double number,
double epsilon)
value if it is greater than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.greaterThan(double, double, double)public static double checkGreaterThan(double value,
double number,
String name)
value if it is greater than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThan(double, double)public static double checkGreaterThan(double value,
double number)
value if it is greater than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater thanvalueFloatingPoint.greaterThan(double, double)public static char checkGreaterThan(char value,
char number,
String name)
value - the value to checknumber - the number that value must be greater thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static char checkGreaterThan(char value,
char number)
value - the value to checknumber - the number that value must be greater thanvaluepublic static byte checkGreaterThanOrEqual(byte value,
byte number,
String name)
value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkGreaterThanOrEqual(byte value,
byte number)
value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static short checkGreaterThanOrEqual(short value,
short number,
String name)
value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkGreaterThanOrEqual(short value,
short number)
value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static int checkGreaterThanOrEqual(int value,
int number,
String name)
value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkGreaterThanOrEqual(int value,
int number)
value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static long checkGreaterThanOrEqual(long value,
long number,
String name)
value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkGreaterThanOrEqual(long value,
long number)
value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static float checkGreaterThanOrEqual(float value,
float number,
float epsilon,
String name)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float, float)public static float checkGreaterThanOrEqual(float value,
float number,
float epsilon)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.greaterThanOrEqual(float, float, float)public static float checkGreaterThanOrEqual(float value,
float number,
String name)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float)public static float checkGreaterThanOrEqual(float value,
float number)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal tovalueFloatingPoint.greaterThanOrEqual(float, float)public static double checkGreaterThanOrEqual(double value,
double number,
double epsilon,
String name)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double, double)public static double checkGreaterThanOrEqual(double value,
double number,
double epsilon)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.greaterThanOrEqual(double, double, double)public static double checkGreaterThanOrEqual(double value,
double number,
String name)
value if it is greater than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double)public static double checkGreaterThanOrEqual(double value,
double number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be greater than or
equal tovalueFloatingPoint.greaterThanOrEqual(double, double)public static char checkGreaterThanOrEqual(char value,
char number,
String name)
value - the value to checknumber - the number that value must be greater than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static char checkGreaterThanOrEqual(char value,
char number)
value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static byte checkLessThan(byte value,
byte number,
String name)
value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkLessThan(byte value,
byte number)
value - the value to checknumber - the number that value must be less thanvaluepublic static short checkLessThan(short value,
short number,
String name)
value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkLessThan(short value,
short number)
value - the value to checknumber - the number that value must be less thanvaluepublic static int checkLessThan(int value,
int number,
String name)
value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkLessThan(int value,
int number)
value - the value to checknumber - the number that value must be less thanvaluepublic static long checkLessThan(long value,
long number,
String name)
value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkLessThan(long value,
long number)
value - the value to checknumber - the number that value must be less thanvaluepublic static float checkLessThan(float value,
float number,
float epsilon,
String name)
value if it is less than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(float, float, float)public static float checkLessThan(float value,
float number,
float epsilon)
value if it is less than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.lessThan(float, float, float)public static float checkLessThan(float value,
float number,
String name)
value if it is less than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(float, float)public static float checkLessThan(float value,
float number)
value if it is less than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be less thanvalueFloatingPoint.lessThan(float, float)public static double checkLessThan(double value,
double number,
double epsilon,
String name)
value if it is less than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(double, double, double)public static double checkLessThan(double value,
double number,
double epsilon)
value if it is less than number, otherwise
throws IllegalArgumentException. The epsilon is used to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.lessThan(double, double, double)public static double checkLessThan(double value,
double number,
String name)
value if it is less than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(double, double)public static double checkLessThan(double value,
double number)
value if it is less than number, otherwise
throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be less thanvalueFloatingPoint.lessThan(double, double)public static char checkLessThan(char value,
char number,
String name)
value - the value to checknumber - the number that value must be less thanname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static char checkLessThan(char value,
char number)
value - the value to checknumber - the number that value must be less thanvaluepublic static byte checkLessThanOrEqual(byte value,
byte number,
String name)
value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkLessThanOrEqual(byte value,
byte number)
value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static short checkLessThanOrEqual(short value,
short number,
String name)
value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkLessThanOrEqual(short value,
short number)
value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static int checkLessThanOrEqual(int value,
int number,
String name)
value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkLessThanOrEqual(int value,
int number)
value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static long checkLessThanOrEqual(long value,
long number,
String name)
value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkLessThanOrEqual(long value,
long number)
value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static float checkLessThanOrEqual(float value,
float number,
float epsilon,
String name)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThanOrEqual(float, float, float)public static float checkLessThanOrEqual(float value,
float number,
float epsilon)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.lessThanOrEqual(float, float, float)public static float checkLessThanOrEqual(float value,
float number,
String name)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThanOrEqual(float, float)public static float checkLessThanOrEqual(float value,
float number)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal tovalueFloatingPoint.lessThanOrEqual(float, float)public static double checkLessThanOrEqual(double value,
double number,
double epsilon,
String name)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThanOrEqual(double, double, double)public static double checkLessThanOrEqual(double value,
double number,
double epsilon)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. The epsilon
is used to determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toepsilon - the acceptable margin of error between value and
number where they will be considered equalvalueFloatingPoint.lessThanOrEqual(double, double, double)public static double checkLessThanOrEqual(double value,
double number,
String name)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThanOrEqual(double, double)public static double checkLessThanOrEqual(double value,
double number)
value if it is less than or equal to number,
otherwise throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value and number are equal.value - the value to checknumber - the number that value must be less than or
equal tovalueFloatingPoint.lessThanOrEqual(double, double)public static char checkLessThanOrEqual(char value,
char number,
String name)
value - the value to checknumber - the number that value must be less than or
equal toname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static char checkLessThanOrEqual(char value,
char number)
value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static byte checkPositive(byte value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkPositive(byte value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static short checkPositive(short value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkPositive(short value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static int checkPositive(int value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkPositive(int value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static long checkPositive(long value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkPositive(long value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static float checkPositive(float value,
float epsilon,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float, float)public static float checkPositive(float value,
float epsilon)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0valueFloatingPoint.greaterThanOrEqual(float, float, float)public static float checkPositive(float value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to
determine if value is equal to 0.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float)public static float checkPositive(float value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to
determine if value is equal to 0.value - the value to checkvalueFloatingPoint.greaterThanOrEqual(float, float)public static double checkPositive(double value,
double epsilon,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double, double)public static double checkPositive(double value,
double epsilon)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0valueFloatingPoint.greaterThanOrEqual(double, double, double)public static double checkPositive(double value,
String name)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to 0.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double)public static double checkPositive(double value)
value if it is positive, which means greater than or
equal to 0. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to 0.value - the value to checkvalueFloatingPoint.greaterThanOrEqual(double, double)public static byte checkNegative(byte value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkNegative(byte value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkvaluepublic static short checkNegative(short value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkNegative(short value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkvaluepublic static int checkNegative(int value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkNegative(int value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkvaluepublic static long checkNegative(long value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkNegative(long value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException.value - the value to checkvaluepublic static float checkNegative(float value,
float epsilon,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. The epsilon is
used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(float, float, float)public static float checkNegative(float value,
float epsilon)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. The epsilon is
used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0valueFloatingPoint.lessThan(float, float, float)public static float checkNegative(float value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value is equal to 0.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(float, float)public static float checkNegative(float value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to determine
if value is equal to 0.value - the value to checkvalueFloatingPoint.lessThan(float, float)public static double checkNegative(double value,
double epsilon,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. The epsilon is
used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(double, double, double)public static double checkNegative(double value,
double epsilon)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. The epsilon is
used to determine if value is equal to 0.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0valueFloatingPoint.lessThan(double, double, double)public static double checkNegative(double value,
String name)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to 0.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.lessThan(double, double)public static double checkNegative(double value)
value if it is negative, which means less than 0. If
not, throws IllegalArgumentException. This will use
FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to 0.value - the value to checkvalueFloatingPoint.lessThan(double, double)public static byte checkInsideRange(byte value,
byte min,
byte max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkInsideRange(byte value,
byte min,
byte max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevaluepublic static short checkInsideRange(short value,
short min,
short max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkInsideRange(short value,
short min,
short max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevaluepublic static int checkInsideRange(int value,
int min,
int max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkInsideRange(int value,
int min,
int max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevaluepublic static long checkInsideRange(long value,
long min,
long max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkInsideRange(long value,
long min,
long max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevaluepublic static float checkInsideRange(float value,
float min,
float max,
float epsilon,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to
min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can beepsilon - the acceptable margin of error when checking if
value is equal to min or maxname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float, float),
FloatingPoint.lessThanOrEqual(float, float, float)public static float checkInsideRange(float value,
float min,
float max,
float epsilon)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to
min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can beepsilon - the acceptable margin of error when checking if
value is equal to min or maxvalueFloatingPoint.greaterThanOrEqual(float, float, float),
FloatingPoint.lessThanOrEqual(float, float, float)public static float checkInsideRange(float value,
float min,
float max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to
determine if value is equal to min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float),
FloatingPoint.lessThanOrEqual(float, float)public static float checkInsideRange(float value,
float min,
float max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_FLOAT as the epsilon to
determine if value is equal to min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevalueFloatingPoint.greaterThanOrEqual(float, float),
FloatingPoint.lessThanOrEqual(float, float)public static double checkInsideRange(double value,
double min,
double max,
double epsilon,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to
min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can beepsilon - the acceptable margin of error when checking if
value is equal to min or maxname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double, double),
FloatingPoint.lessThanOrEqual(double, double, double)public static double checkInsideRange(double value,
double min,
double max,
double epsilon)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. The
epsilon is used to determine if value is equal to
min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can beepsilon - the acceptable margin of error when checking if
value is equal to min or maxvalueFloatingPoint.greaterThanOrEqual(double, double, double),
FloatingPoint.lessThanOrEqual(double, double, double)public static double checkInsideRange(double value,
double min,
double max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double),
FloatingPoint.lessThanOrEqual(double, double)public static double checkInsideRange(double value,
double min,
double max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException. This will
use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the epsilon to
determine if value is equal to min or max.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bevalueFloatingPoint.greaterThanOrEqual(double, double),
FloatingPoint.lessThanOrEqual(double, double)public static char checkInsideRange(char value,
char min,
char max,
String name)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum (inclusive) that value can bemax - the maximum (inclusive) that value can bename - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static char checkInsideRange(char value,
char min,
char max)
value if it is inside the specified range, which means
greater than or equal to min and less than or equal to
max. If not, throws IllegalArgumentException.value - the value to checkmin - the minimum that value can bemax - the maximum that value can bevaluepublic static byte checkPercent(byte value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static byte checkPercent(byte value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkvaluepublic static short checkPercent(short value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static short checkPercent(short value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkvaluepublic static int checkPercent(int value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static int checkPercent(int value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkvaluepublic static long checkPercent(long value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevaluepublic static long checkPercent(long value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.value - the value to checkvaluepublic static float checkPercent(float value,
float epsilon,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
The epsilon is used to determine if value is equal to 0
or 100.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0 or 100name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float, float),
FloatingPoint.lessThanOrEqual(float, float, float)public static float checkPercent(float value,
float epsilon)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
The epsilon is used to determine if value is equal to 0
or 100.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0 or 100valueFloatingPoint.greaterThanOrEqual(float, float, float),
FloatingPoint.lessThanOrEqual(float, float, float)public static float checkPercent(float value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
This will use FloatingPoint.EPSILON_DEFAULT_FLOAT as the
epsilon to determine if value is equal to 0 or 100.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(float, float),
FloatingPoint.lessThanOrEqual(float, float)public static float checkPercent(float value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
This will use FloatingPoint.EPSILON_DEFAULT_FLOAT as the
epsilon to determine if value is equal to 0 or 100.value - the value to checkvalueFloatingPoint.greaterThanOrEqual(float, float),
FloatingPoint.lessThanOrEqual(float, float)public static double checkPercent(double value,
double epsilon,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
The epsilon is used to determine if value is equal to 0
or 100.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0 or 100name - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double, double),
FloatingPoint.lessThanOrEqual(double, double, double)public static double checkPercent(double value,
double epsilon)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
The epsilon is used to determine if value is equal to 0
or 100.value - the value to checkepsilon - the acceptable margin of error when checking if
value is equal to 0 or 100valueFloatingPoint.greaterThanOrEqual(double, double, double),
FloatingPoint.lessThanOrEqual(double, double, double)public static double checkPercent(double value,
String name)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
This will use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the
epsilon to determine if value is equal to 0 or 100.value - the value to checkname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagevalueFloatingPoint.greaterThanOrEqual(double, double),
FloatingPoint.lessThanOrEqual(double, double)public static double checkPercent(double value)
value if it is a valid percent, which means between 0
and 100 (inclusive). If not, throws IllegalArgumentException.
This will use FloatingPoint.EPSILON_DEFAULT_DOUBLE as the
epsilon to determine if value is equal to 0 or 100.value - the value to checkvalueFloatingPoint.greaterThanOrEqual(double, double),
FloatingPoint.lessThanOrEqual(double, double)public static byte[] checkLength(byte[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static byte[] checkLength(byte[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static short[] checkLength(short[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static short[] checkLength(short[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static int[] checkLength(int[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static int[] checkLength(int[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static long[] checkLength(long[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static long[] checkLength(long[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static float[] checkLength(float[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static float[] checkLength(float[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static double[] checkLength(double[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static double[] checkLength(double[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static char[] checkLength(char[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static char[] checkLength(char[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static boolean[] checkLength(boolean[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static boolean[] checkLength(boolean[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.array - the array to checklength - the length that array's length must equalarraypublic static <T> T[] checkLength(T[] array,
int length,
String name)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.T - the type of arrayarray - the array to checklength - the length that array's length must equalname - the name of the argument to be included in the detail
message of the IllegalArgumentException if it is thrown, or
null for no detail messagearraypublic static <T> T[] checkLength(T[] array,
int length)
array if it's not null and its length equals
length, otherwise throws IllegalArgumentException.T - the type of arrayarray - the array to checklength - the length that array's length must equalarrayCopyright © 2022 Frostphyr. All rights reserved.