Class Preconditions


  • public final class Preconditions
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Preconditions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T checkNotNull​(T t, java.lang.String message)
      Throws a NullPointerException if t is null.
      • Methods inherited from class java.lang.Object

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

      • Preconditions

        private Preconditions()
    • Method Detail

      • checkNotNull

        public static <T> T checkNotNull​(T t,
                                         java.lang.String message)
        Throws a NullPointerException if t is null.
        Parameters:
        t - the value to check for null
        message - the message to include in the thrown exception
        Returns:
        T
        Throws:
        java.lang.NullPointerException - if t is null