public final class Condition
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
ensureAtLeast(double value,
double referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Double value is at least as great as a reference value. |
static void |
ensureAtLeast(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Double value is at least as great as a reference value. |
static void |
ensureAtLeast(float value,
float referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Float value is at least as great as a reference value. |
static void |
ensureAtLeast(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Float value is at least as great as a reference value. |
static void |
ensureAtLeast(int value,
int referenceValue,
java.lang.String exceptionMessage)
Ensures, that an
Integer value is at least as great as a reference value. |
static void |
ensureAtLeast(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that an
Integer value is at least as great as a reference value. |
static void |
ensureAtLeast(long value,
long referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Long value is at least as great as a reference value. |
static void |
ensureAtLeast(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Long value is at least as great as a reference value. |
static void |
ensureAtLeast(short value,
short referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Short value is at least as great as a reference value. |
static void |
ensureAtLeast(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Short value is at least as great as a reference value. |
static void |
ensureAtMaximum(double value,
double referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Double value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Double value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(float value,
float referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Float value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Float value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(int value,
int referenceValue,
java.lang.String exceptionMessage)
Ensures, that an
Integer value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that an
Integer value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(long value,
long referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Long value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Long value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(short value,
short referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Short value is at maximum as great as a reference value. |
static void |
ensureAtMaximum(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Short value is at maximum as great as a reference value. |
static void |
ensureGreater(double value,
double referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Double value is greater as a reference value. |
static void |
ensureGreater(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Double value is greater as a reference value. |
static void |
ensureGreater(float value,
float referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Float value is greater as a reference value. |
static void |
ensureGreater(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Float value is greater as a reference value. |
static void |
ensureGreater(int value,
int referenceValue,
java.lang.String exceptionMessage)
Ensures, that an
Integer value is greater as a reference value. |
static void |
ensureGreater(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that an
Integer value is greater as a reference value. |
static void |
ensureGreater(long value,
long referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Long value is greater as a reference value. |
static void |
ensureGreater(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Long value is greater as a reference value. |
static void |
ensureGreater(short value,
short referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Short value is greater as a reference value. |
static void |
ensureGreater(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Short value is greater as a reference value. |
static void |
ensureNotEmpty(java.lang.CharSequence text,
java.lang.String exceptionMessage)
Ensures, that a text is not empty.
|
static void |
ensureNotEmpty(java.lang.CharSequence text,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a text is not empty.
|
static void |
ensureNotNull(java.lang.Object object,
java.lang.String exceptionMessage)
Ensures that an object is not null.
|
static void |
ensureNotNull(java.lang.Object object,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures that an object is not null.
|
static void |
ensureSmaller(double value,
double referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Double value is smaller as a reference value. |
static void |
ensureSmaller(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Double value is smaller as a reference value. |
static void |
ensureSmaller(float value,
float referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Float value is smaller as a reference value. |
static void |
ensureSmaller(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Float value is smaller as a reference value. |
static void |
ensureSmaller(int value,
int referenceValue,
java.lang.String exceptionMessage)
Ensures, that an
Integer value is smaller as a reference value. |
static void |
ensureSmaller(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that an
Integer value is smaller as a reference value. |
static void |
ensureSmaller(long value,
long referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Long value is smaller as a reference value. |
static void |
ensureSmaller(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Long value is smaller as a reference value. |
static void |
ensureSmaller(short value,
short referenceValue,
java.lang.String exceptionMessage)
Ensures, that a
Short value is smaller as a reference value. |
static void |
ensureSmaller(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Ensures, that a
Short value is smaller as a reference value. |
public static void ensureNotNull(java.lang.Object object,
java.lang.String exceptionMessage)
NullPointerException with a specific
message is thrown.object - The object, which should be checked, as an instance of the class ObjectexceptionMessage - The message of the exception, which is thrown, if the given object is null, as a
String or null, if the exception should not have a messagepublic static void ensureNotNull(java.lang.Object object,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
RuntimeException is thrown.object - The object, which should be checked, as an instance of the class ObjectexceptionMessage - The message of the exception, which is thrown, if the given object is null, as a
String or null, if the exception should not have a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given object is
null, as an instance of the class Class. The class may not be nullpublic static void ensureNotEmpty(java.lang.CharSequence text,
java.lang.String exceptionMessage)
IllegalArgumentException with a
specific message is thrown.text - The text, which should be checked, as an instance of the type CharSequenceexceptionMessage - The message of the exception, which is thrown, if the given text is empty, as a
String or null, if the exception should not have a messagepublic static void ensureNotEmpty(java.lang.CharSequence text,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
RuntimeException is thrown.text - The text, which should be checked, as an instance of the type CharSequenceexceptionMessage - The message of the exception, which is thrown, if the given text is empty, as a
String or null, if the exception should not have a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given text is
empty, as an instance of the class Class. The class may not be nullpublic static void ensureAtLeast(short value,
short referenceValue,
java.lang.String exceptionMessage)
Short value is at least as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be at least as great as, as a Short
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtLeast(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Short value is at least as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be at least as great as, as a Short
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtLeast(int value,
int referenceValue,
java.lang.String exceptionMessage)
Integer value is at least as great as a reference value. Otherwise
an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be at least as great as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtLeast(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Integer value is at least as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be at least as great as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtLeast(long value,
long referenceValue,
java.lang.String exceptionMessage)
Long value is at least as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be at least as great as, as a Long
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtLeast(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Long value is at least as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be at least as great as, as a Long
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtLeast(float value,
float referenceValue,
java.lang.String exceptionMessage)
Float value is at least as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be at least as great as, as a Float
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtLeast(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Float value is at least as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be at least as great as, as a Float
valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtLeast(double value,
double referenceValue,
java.lang.String exceptionMessage)
Double value is at least as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be at least as great as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtLeast(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Double value is at least as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be at least as great as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtMaximum(short value,
short referenceValue,
java.lang.String exceptionMessage)
Short value is at maximum as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtMaximum(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Short value is at maximum as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtMaximum(int value,
int referenceValue,
java.lang.String exceptionMessage)
Integer value is at maximum as great as a reference value. Otherwise
an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be at maximum as great as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtMaximum(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Integer value is at maximum as great as a reference value. Otherwise
a specific RuntimeException is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtMaximum(long value,
long referenceValue,
java.lang.String exceptionMessage)
Long value is at maximum as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtMaximum(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Long value is at maximum as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtMaximum(float value,
float referenceValue,
java.lang.String exceptionMessage)
Float value is at maximum as great as a reference value. Otherwise an
IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtMaximum(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Float value is at maximum as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureAtMaximum(double value,
double referenceValue,
java.lang.String exceptionMessage)
Double value is at maximum as great as a reference value. Otherwise
an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messagepublic static void ensureAtMaximum(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Double value is at maximum as great as a reference value. Otherwise a
specific RuntimeException is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be at maximum as great as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater as the
reference value, as a String or null, if the exception should not have a
messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater as the reference value, as an instance of the class Class. The class
may not be nullpublic static void ensureGreater(short value,
short referenceValue,
java.lang.String exceptionMessage)
Short value is greater as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be greater as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureGreater(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Short value is greater as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be greater as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureGreater(int value,
int referenceValue,
java.lang.String exceptionMessage)
Integer value is greater as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be greater as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureGreater(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Integer value is greater as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be greater as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureGreater(long value,
long referenceValue,
java.lang.String exceptionMessage)
Long value is greater as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be greater as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureGreater(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Long value is greater as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be greater as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureGreater(float value,
float referenceValue,
java.lang.String exceptionMessage)
Float value is greater as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be greater as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureGreater(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Float value is greater as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be greater as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureGreater(double value,
double referenceValue,
java.lang.String exceptionMessage)
Double value is greater as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be greater as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureGreater(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Double value is greater as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be greater as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is smaller or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
smaller or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureSmaller(short value,
short referenceValue,
java.lang.String exceptionMessage)
Short value is smaller as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be smaller as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureSmaller(short value,
short referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Short value is smaller as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Short valuereferenceValue - The reference value, the given value must be smaller as, as a Short valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureSmaller(int value,
int referenceValue,
java.lang.String exceptionMessage)
Integer value is smaller as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be smaller as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureSmaller(int value,
int referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Integer value is smaller as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as an Integer valuereferenceValue - The reference value, the given value must be smaller as, as an Integer valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureSmaller(long value,
long referenceValue,
java.lang.String exceptionMessage)
Long value is smaller as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be smaller as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureSmaller(long value,
long referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Long value is smaller as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Long valuereferenceValue - The reference value, the given value must be smaller as, as a Long valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureSmaller(float value,
float referenceValue,
java.lang.String exceptionMessage)
Float value is smaller as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be smaller as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureSmaller(float value,
float referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Float value is smaller as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Float valuereferenceValue - The reference value, the given value must be smaller as, as a Float valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater or equal as the reference value, as an instance of the class Class.
The class may not be nullpublic static void ensureSmaller(double value,
double referenceValue,
java.lang.String exceptionMessage)
Double value is smaller as a reference value. Otherwise an IllegalArgumentException with a specific message is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be smaller as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messagepublic static void ensureSmaller(double value,
double referenceValue,
java.lang.String exceptionMessage,
java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
Double value is smaller as a reference value. Otherwise a specific
RuntimeException is thrown.value - The value, which should be checked, as a Double valuereferenceValue - The reference value, the given value must be smaller as, as a Double valueexceptionMessage - The message of the exception, which is thrown, if the given value is greater or equal
as the reference value, as a String or null, if the exception should not have
a messageexceptionClass - The class of the runtime exception, which should be thrown, if the given value is
greater or equal as the reference value, as an instance of the class Class.
The class may not be null