Class Assert

java.lang.Object
com.github.toolarium.common.util.Assert

public final class Assert extends Object
Utility class for assertion of input parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends Exception>
    void
    isEmpty(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>
    void
    isEmpty(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>
    void
    isEqual(boolean object1, boolean object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(byte object1, byte object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(char object1, char object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(double object1, double object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(float object1, float object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(int object1, int object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(long object1, long object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(short object1, short object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isEqual(Object object1, Object object2, Class<T> exceptionClass, String exceptionMessage)
    Assert that the two input objects are equal, throw an exception otherwise.
    static <T extends Exception>
    void
    isEqual(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>
    void
    isFalse(boolean expression, Class<T> exceptionClass, String exceptionMessage)
    Assert that the input object must be false, throw an exception otherwise.
    static <T extends Exception>
    void
    isFalse(boolean expression, Class<T> exceptionClass, String exceptionMessage, String logMessage)
    Assert that the input object must be false, throw an exception otherwise.
    static <T extends Exception>
    void
    isNotEmpty(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>
    void
    isNotEmpty(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotEqual(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>
    void
    isNotNull(Object object, Class<T> exceptionClass, String exceptionMessage)
    Assert that the input object is not null, throw an exception otherwise.
    static <T extends Exception>
    void
    isNotNull(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage)
    Assert that the input object must not be null, throw an exception otherwise.
    static <T extends Exception>
    void
    isNull(Object object, Class<T> exceptionClass, String exceptionMessage)
    Assert that the input object is null, throw an exception otherwise.
    static <T extends Exception>
    void
    isNull(Object object, Class<T> exceptionClass, String exceptionMessage, String logMessage)
    Assert that the input object must be null, throw an exception otherwise.
    static <T extends Exception>
    void
    isTrue(boolean expression, Class<T> exceptionClass, String exceptionMessage)
    Assert that the input object must be true, throw an exception otherwise.
    static <T extends Exception>
    void
    isTrue(boolean expression, Class<T> exceptionClass, String exceptionMessage, String logMessage)
    Assert that the input object must be true, throw an exception otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 expression
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 expression
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 expression
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 expression
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - 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 validate
      object2 - the object 2 to validate
      exceptionClass - the exception class to throw if it fail
      exceptionMessage - the exception message
      logMessage - the message to log
      Throws:
      T - in case of error