Package com.github.toolarium.common.util
Class Assert
java.lang.Object
com.github.toolarium.common.util.Assert
Utility class for assertion of input parameters.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Exception>
voidAssert that the input must not be null or empty, throw an exception otherwise.static <T extends Exception>
voidAssert that the input must not be null or empty, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidisEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must be false, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must be false, throw an exception otherwise.static <T extends Exception>
voidisNotEmpty(Object object, Class<T> exceptionClass, String exceptionMessage) Assert that the input must not be null or empty, throw an exception otherwise.static <T extends Exception>
voidisNotEmpty(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the input must not be null or empty, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidisNotEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) Assert that the two input objects are not equal, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object is not null, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must not be null, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object is null, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must be null, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must be true, throw an exception otherwise.static <T extends Exception>
voidAssert that the input object must be true, throw an exception otherwise.
-
Method Details
-
isTrue
public static <T extends Exception> void isTrue(boolean expression, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input object must be true, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
expression- the the expressionexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isTrue
public static <T extends Exception> void isTrue(boolean expression, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input object must be true, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
expression- the the expressionexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isFalse
public static <T extends Exception> void isFalse(boolean expression, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input object must be false, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
expression- the the expressionexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isFalse
public static <T extends Exception> void isFalse(boolean expression, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input object must be false, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
expression- the the expressionexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNull
public static <T extends Exception> void isNull(Object object, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input object is null, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNull
public static <T extends Exception> void isNull(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input object must be null, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotNull
public static <T extends Exception> void isNotNull(Object object, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input object is not null, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotNull
public static <T extends Exception> void isNotNull(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input object must not be null, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEmpty
public static <T extends Exception> void isEmpty(Object object, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input must not be null or empty, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEmpty
public static <T extends Exception> void isEmpty(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input must not be null or empty, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEmpty
public static <T extends Exception> void isNotEmpty(Object object, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the input must not be null or empty, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEmpty
public static <T extends Exception> void isNotEmpty(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the input must not be null or empty, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object- the object to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isEqual
public static <T extends Exception> void isEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception message- Throws:
T- in case of error
-
isNotEqual
public static <T extends Exception> void isNotEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage, String logMessage) throws T Assert that the two input objects are not equal, throw an exception otherwise.- Type Parameters:
T- the generic exception type- Parameters:
object1- the object 1 to validateobject2- the object 2 to validateexceptionClass- the exception class to throw if it failexceptionMessage- the exception messagelogMessage- the message to log- Throws:
T- in case of error
-