Class Preconditions


  • public final class Preconditions
    extends java.lang.Object
    Contains common assertions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkArgument​(boolean expression, java.lang.String message)  
      static java.lang.String checkNotEmpty​(java.lang.String string)  
      static <T extends java.util.Collection<Y>,​Y>
      T
      checkNotEmpty​(T collection)  
      static <T> T checkNotNull​(T arg)  
      static <T> T checkNotNull​(T arg, java.lang.String message)  
      • Methods inherited from class java.lang.Object

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

      • checkArgument

        public static void checkArgument​(boolean expression,
                                         @NonNull
                                         java.lang.String message)
      • checkNotNull

        @NonNull
        public static <T> T checkNotNull​(@Nullable
                                         T arg)
      • checkNotNull

        @NonNull
        public static <T> T checkNotNull​(@Nullable
                                         T arg,
                                         @NonNull
                                         java.lang.String message)
      • checkNotEmpty

        @NonNull
        public static java.lang.String checkNotEmpty​(@Nullable
                                                     java.lang.String string)
      • checkNotEmpty

        @NonNull
        public static <T extends java.util.Collection<Y>,​Y> T checkNotEmpty​(@NonNull
                                                                                  T collection)