Class Assert


  • public class Assert
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Assert()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void doesNotStartWith​(java.lang.String string, java.lang.String forbiddenPrefix)  
      static void doesNotStartWith​(java.lang.String string, java.lang.String forbiddenPrefix, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void equals​(long one, long other)  
      static void equals​(long one, long other, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static <T> void equals​(T one, T other)  
      static <T> void equals​(T one, T other, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void hasSize​(java.util.Collection<?> values, int expectedSize)  
      static void hasSize​(java.util.Collection<?> values, int expectedSize, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void isEmpty​(java.util.Collection<?> values)  
      static void isEmpty​(java.util.Collection<?> values, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void isFalse​(boolean value, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void isNull​(java.lang.Object value)  
      static void isNull​(java.lang.Object value, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void isTrue​(boolean value, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void notEmpty​(java.util.Collection<?> values)  
      static void notEmpty​(java.util.Collection<?> values, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void notNull​(java.lang.Object value)  
      static void notNull​(java.lang.Object value, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void notNullOrEmpty​(java.lang.String string)  
      static void notNullOrEmpty​(java.lang.String string, java.util.function.Supplier<java.lang.String> messageSupplier)  
      static void startsWith​(java.lang.String string, java.lang.String requiredPrefix)  
      static void startsWith​(java.lang.String string, java.lang.String requiredPrefix, java.util.function.Supplier<java.lang.String> messageSupplier)  
      • Methods inherited from class java.lang.Object

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

      • Assert

        public Assert()
    • Method Detail

      • isEmpty

        public static void isEmpty​(java.util.Collection<?> values)
      • isEmpty

        public static void isEmpty​(java.util.Collection<?> values,
                                   java.util.function.Supplier<java.lang.String> messageSupplier)
      • notEmpty

        public static void notEmpty​(java.util.Collection<?> values)
      • hasSize

        public static void hasSize​(java.util.Collection<?> values,
                                   int expectedSize)
      • hasSize

        public static void hasSize​(java.util.Collection<?> values,
                                   int expectedSize,
                                   java.util.function.Supplier<java.lang.String> messageSupplier)
      • notEmpty

        public static void notEmpty​(java.util.Collection<?> values,
                                    java.util.function.Supplier<java.lang.String> messageSupplier)
      • equals

        public static <T> void equals​(T one,
                                      T other)
      • equals

        public static void equals​(long one,
                                  long other)
      • equals

        public static <T> void equals​(T one,
                                      T other,
                                      java.util.function.Supplier<java.lang.String> messageSupplier)
      • equals

        public static void equals​(long one,
                                  long other,
                                  java.util.function.Supplier<java.lang.String> messageSupplier)
      • isTrue

        public static void isTrue​(boolean value,
                                  java.util.function.Supplier<java.lang.String> messageSupplier)
      • isFalse

        public static void isFalse​(boolean value,
                                   java.util.function.Supplier<java.lang.String> messageSupplier)
      • isNull

        public static void isNull​(java.lang.Object value)
      • isNull

        public static void isNull​(java.lang.Object value,
                                  java.util.function.Supplier<java.lang.String> messageSupplier)
      • notNull

        public static void notNull​(java.lang.Object value)
      • notNull

        public static void notNull​(java.lang.Object value,
                                   java.util.function.Supplier<java.lang.String> messageSupplier)
      • startsWith

        public static void startsWith​(java.lang.String string,
                                      java.lang.String requiredPrefix)
      • startsWith

        public static void startsWith​(java.lang.String string,
                                      java.lang.String requiredPrefix,
                                      java.util.function.Supplier<java.lang.String> messageSupplier)
      • doesNotStartWith

        public static void doesNotStartWith​(java.lang.String string,
                                            java.lang.String forbiddenPrefix)
      • doesNotStartWith

        public static void doesNotStartWith​(java.lang.String string,
                                            java.lang.String forbiddenPrefix,
                                            java.util.function.Supplier<java.lang.String> messageSupplier)
      • notNullOrEmpty

        public static void notNullOrEmpty​(java.lang.String string)
      • notNullOrEmpty

        public static void notNullOrEmpty​(java.lang.String string,
                                          java.util.function.Supplier<java.lang.String> messageSupplier)