Class Assert


  • public final class Assert
    extends java.lang.Object
    Utility class providing some defensive coding convenience methods.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Assert()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean equals​(java.lang.Object obj1, java.lang.Object obj2)  
      static int hashCode​(boolean bool)  
      static int hashCode​(java.lang.Object obj)  
      static <T> T notNull​(T object, java.lang.String description)
      Throws a NullPointerException if the specified object is null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Assert

        private Assert()
    • Method Detail

      • notNull

        public static <T> T notNull​(T object,
                                    java.lang.String description)
        Throws a NullPointerException if the specified object is null.
        Type Parameters:
        T - type of the object to check
        Parameters:
        object - the object to verify
        description - error message
        Returns:
        the verified object
      • equals

        public static boolean equals​(java.lang.Object obj1,
                                     java.lang.Object obj2)
      • hashCode

        public static int hashCode​(java.lang.Object obj)
      • hashCode

        public static int hashCode​(boolean bool)