public final class Argument extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte |
checkGreaterThan(byte value,
byte number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static byte |
checkGreaterThan(byte value,
byte number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static char |
checkGreaterThan(char value,
char number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static char |
checkGreaterThan(char value,
char number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static double |
checkGreaterThan(double value,
double number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static double |
checkGreaterThan(double value,
double number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static float |
checkGreaterThan(float value,
float number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static float |
checkGreaterThan(float value,
float number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static int |
checkGreaterThan(int value,
int number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static int |
checkGreaterThan(int value,
int number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static long |
checkGreaterThan(long value,
long number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static long |
checkGreaterThan(long value,
long number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static short |
checkGreaterThan(short value,
short number)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static short |
checkGreaterThan(short value,
short number,
String message)
Returns the specified
value if it is greater than the specified
number, otherwise throws IllegalArgumentException. |
static byte |
checkGreaterThanOrEqual(byte value,
byte number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static byte |
checkGreaterThanOrEqual(byte value,
byte number,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static char |
checkGreaterThanOrEqual(char value,
char number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static char |
checkGreaterThanOrEqual(char value,
char number,
String message)
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)
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,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static float |
checkGreaterThanOrEqual(float value,
float number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static float |
checkGreaterThanOrEqual(float value,
float number,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static int |
checkGreaterThanOrEqual(int value,
int number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static int |
checkGreaterThanOrEqual(int value,
int number,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static long |
checkGreaterThanOrEqual(long value,
long number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static long |
checkGreaterThanOrEqual(long value,
long number,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static short |
checkGreaterThanOrEqual(short value,
short number)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static short |
checkGreaterThanOrEqual(short value,
short number,
String message)
Returns the specified
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException. |
static byte |
checkInsideRange(byte value,
byte min,
byte max)
Returns the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
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 message)
Returns the specified
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 the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static boolean[] |
checkLength(boolean[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static byte[] |
checkLength(byte[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static byte[] |
checkLength(byte[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static char[] |
checkLength(char[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static char[] |
checkLength(char[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static double[] |
checkLength(double[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static double[] |
checkLength(double[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static float[] |
checkLength(float[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static float[] |
checkLength(float[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static int[] |
checkLength(int[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static int[] |
checkLength(int[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static long[] |
checkLength(long[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static long[] |
checkLength(long[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static short[] |
checkLength(short[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static short[] |
checkLength(short[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static <T> T[] |
checkLength(T[] array,
int length)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static <T> T[] |
checkLength(T[] array,
int length,
String message)
Returns the specified
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException. |
static byte |
checkLessThan(byte value,
byte number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static byte |
checkLessThan(byte value,
byte number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static char |
checkLessThan(char value,
char number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static char |
checkLessThan(char value,
char number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static double |
checkLessThan(double value,
double number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static double |
checkLessThan(double value,
double number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static float |
checkLessThan(float value,
float number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static float |
checkLessThan(float value,
float number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static int |
checkLessThan(int value,
int number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static int |
checkLessThan(int value,
int number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static long |
checkLessThan(long value,
long number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static long |
checkLessThan(long value,
long number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static short |
checkLessThan(short value,
short number)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static short |
checkLessThan(short value,
short number,
String message)
Returns the specified
value if it is less than the specified
number, otherwise throws IllegalArgumentException. |
static byte |
checkLessThanOrEqual(byte value,
byte number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static byte |
checkLessThanOrEqual(byte value,
byte number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static char |
checkLessThanOrEqual(char value,
char number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static char |
checkLessThanOrEqual(char value,
char number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static double |
checkLessThanOrEqual(double value,
double number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static double |
checkLessThanOrEqual(double value,
double number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static float |
checkLessThanOrEqual(float value,
float number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static float |
checkLessThanOrEqual(float value,
float number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static int |
checkLessThanOrEqual(int value,
int number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static int |
checkLessThanOrEqual(int value,
int number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static long |
checkLessThanOrEqual(long value,
long number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static long |
checkLessThanOrEqual(long value,
long number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static short |
checkLessThanOrEqual(short value,
short number)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static short |
checkLessThanOrEqual(short value,
short number,
String message)
Returns the specified
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException. |
static byte |
checkNegative(byte value)
Returns the specified
value if it is negative, which means less
than 0. |
static byte |
checkNegative(byte value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static double |
checkNegative(double value)
Returns the specified
value if it is negative, which means less
than 0. |
static double |
checkNegative(double value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static float |
checkNegative(float value)
Returns the specified
value if it is negative, which means less
than 0. |
static float |
checkNegative(float value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static int |
checkNegative(int value)
Returns the specified
value if it is negative, which means less
than 0. |
static int |
checkNegative(int value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static long |
checkNegative(long value)
Returns the specified
value if it is negative, which means less
than 0. |
static long |
checkNegative(long value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static short |
checkNegative(short value)
Returns the specified
value if it is negative, which means less
than 0. |
static short |
checkNegative(short value,
String message)
Returns the specified
value if it is negative, which means less
than 0. |
static <T> T |
checkNotNull(T value)
|
static <T> T |
checkNotNull(T value,
String message)
|
static byte |
checkPercent(byte value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static byte |
checkPercent(byte value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static double |
checkPercent(double value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static double |
checkPercent(double value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static float |
checkPercent(float value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static float |
checkPercent(float value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static int |
checkPercent(int value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static int |
checkPercent(int value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static long |
checkPercent(long value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static long |
checkPercent(long value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static short |
checkPercent(short value)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static short |
checkPercent(short value,
String message)
Returns the specified
value if it is a valid percent, which
means between 0 and 100. |
static byte |
checkPositive(byte value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static byte |
checkPositive(byte value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static double |
checkPositive(double value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static double |
checkPositive(double value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static float |
checkPositive(float value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static float |
checkPositive(float value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static int |
checkPositive(int value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static int |
checkPositive(int value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static long |
checkPositive(long value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static long |
checkPositive(long value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static short |
checkPositive(short value)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
static short |
checkPositive(short value,
String message)
Returns the specified
value if it is positive, which means
greater than or equal to 0. |
public static <T> T checkNotNull(T value,
String message)
T - the type of the valuevalue - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static <T> T checkNotNull(T value)
T - the type of the valuevalue - the value to checkvaluepublic static byte checkGreaterThan(byte value,
byte number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static byte checkGreaterThan(byte value,
byte number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static short checkGreaterThan(short value,
short number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static short checkGreaterThan(short value,
short number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static int checkGreaterThan(int value,
int number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static int checkGreaterThan(int value,
int number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static long checkGreaterThan(long value,
long number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static long checkGreaterThan(long value,
long number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static float checkGreaterThan(float value,
float number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkGreaterThan(float value,
float number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static double checkGreaterThan(double value,
double number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkGreaterThan(double value,
double number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static char checkGreaterThan(char value,
char number,
String message)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static char checkGreaterThan(char value,
char number)
value if it is greater than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be greater thanvaluepublic static byte checkGreaterThanOrEqual(byte value,
byte number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static byte checkGreaterThanOrEqual(byte value,
byte number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static short checkGreaterThanOrEqual(short value,
short number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static short checkGreaterThanOrEqual(short value,
short number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static int checkGreaterThanOrEqual(int value,
int number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static int checkGreaterThanOrEqual(int value,
int number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static long checkGreaterThanOrEqual(long value,
long number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static long checkGreaterThanOrEqual(long value,
long number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static float checkGreaterThanOrEqual(float value,
float number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkGreaterThanOrEqual(float value,
float number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static double checkGreaterThanOrEqual(double value,
double number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkGreaterThanOrEqual(double value,
double number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static char checkGreaterThanOrEqual(char value,
char number,
String message)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static char checkGreaterThanOrEqual(char value,
char number)
value if it is greater than or equal to
the specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be greater than or
equal tovaluepublic static byte checkLessThan(byte value,
byte number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static byte checkLessThan(byte value,
byte number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static short checkLessThan(short value,
short number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static short checkLessThan(short value,
short number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static int checkLessThan(int value,
int number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static int checkLessThan(int value,
int number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static long checkLessThan(long value,
long number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static long checkLessThan(long value,
long number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static float checkLessThan(float value,
float number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkLessThan(float value,
float number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static double checkLessThan(double value,
double number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkLessThan(double value,
double number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static char checkLessThan(char value,
char number,
String message)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static char checkLessThan(char value,
char number)
value if it is less than the specified
number, otherwise throws IllegalArgumentException.value - the value to checknumber - the number that value must be less thanvaluepublic static byte checkLessThanOrEqual(byte value,
byte number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static byte checkLessThanOrEqual(byte value,
byte number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static short checkLessThanOrEqual(short value,
short number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static short checkLessThanOrEqual(short value,
short number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static int checkLessThanOrEqual(int value,
int number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static int checkLessThanOrEqual(int value,
int number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static long checkLessThanOrEqual(long value,
long number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static long checkLessThanOrEqual(long value,
long number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static float checkLessThanOrEqual(float value,
float number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkLessThanOrEqual(float value,
float number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static double checkLessThanOrEqual(double value,
double number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkLessThanOrEqual(double value,
double number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static char checkLessThanOrEqual(char value,
char number,
String message)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tomessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static char checkLessThanOrEqual(char value,
char number)
value if it is less than or equal to the
specified number, otherwise throws
IllegalArgumentException.value - the value to checknumber - the number that value must be less than or
equal tovaluepublic static byte checkPositive(byte value,
String message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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,
String message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkPositive(float value)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static double checkPositive(double value,
String message)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkPositive(double value)
value if it is positive, which means
greater than or equal to 0. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static byte checkNegative(byte value,
String message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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,
String message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkNegative(float value)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static double checkNegative(double value,
String message)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkNegative(double value)
value if it is negative, which means less
than 0. If not, throws IllegalArgumentException.value - the value to checkvaluepublic static byte checkInsideRange(byte value,
byte min,
byte max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 that value can bemax - the maximum that value can bevaluepublic static short checkInsideRange(short value,
short min,
short max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 that value can bemax - the maximum that value can bevaluepublic static int checkInsideRange(int value,
int min,
int max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 that value can bemax - the maximum that value can bevaluepublic static long checkInsideRange(long value,
long min,
long max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 that value can bemax - the maximum that value can bevaluepublic static float checkInsideRange(float value,
float min,
float max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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.value - the value to checkmin - the minimum that value can bemax - the maximum that value can bevaluepublic static double checkInsideRange(double value,
double min,
double max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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.value - the value to checkmin - the minimum that value can bemax - the maximum that value can bevaluepublic static char checkInsideRange(char value,
char min,
char max,
String message)
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 bemessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic 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 message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static byte checkPercent(byte value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static short checkPercent(short value,
String message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static short checkPercent(short value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static int checkPercent(int value,
String message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static int checkPercent(int value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static long checkPercent(long value,
String message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static long checkPercent(long value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static float checkPercent(float value,
String message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static float checkPercent(float value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static double checkPercent(double value,
String message)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkmessage - the detail message for the
IllegalArgumentException if it's thrownvaluepublic static double checkPercent(double value)
value if it is a valid percent, which
means between 0 and 100. If not, throws
IllegalArgumentException.value - the value to checkvaluepublic static byte[] checkLength(byte[] array,
int length,
String message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static byte[] checkLength(byte[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static short[] checkLength(short[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static int[] checkLength(int[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static long[] checkLength(long[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static float[] checkLength(float[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static double[] checkLength(double[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static char[] checkLength(char[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static boolean[] checkLength(boolean[] array,
int length)
array if it's not null and its
length equals the specified 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 message)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalmessage - the detail message for the
IllegalArgumentException if it's thrownarraypublic static <T> T[] checkLength(T[] array,
int length)
array if it's not null and its
length equals the specified length, otherwise throws
IllegalArgumentException.array - the array to checklength - the length that array's length must equalarrayCopyright © 2021 Frostphyr. All rights reserved.