Interface Precondition

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Precondition
  • Method Details

    • apply

      boolean apply()
    • negate

      default Precondition negate()
    • and

      default Precondition and(Precondition other)
    • nonNull

      static Precondition nonNull(Object value)
    • empty

      static Precondition empty(String value)
    • nonEmpty

      static Precondition nonEmpty(String value)
    • positive

      static Precondition positive(int value)
    • negative

      static Precondition negative(int value)
    • greaterThan

      static Precondition greaterThan(int value, int min)
    • greaterThanOrEquals

      static Precondition greaterThanOrEquals(int value, int min)
    • lowerThan

      static Precondition lowerThan(int value, int max)
    • lowerThanOrEquals

      static Precondition lowerThanOrEquals(int value, int max)
    • range

      static Precondition range(int value, int min, int max)
    • checkNonNull

      static <T> T checkNonNull(T value)
    • checkNonNull

      static <T> T checkNonNull(T value, String message)
    • checkNonEmpty

      static String checkNonEmpty(String value)
    • checkNonEmpty

      static String checkNonEmpty(String value, String message)
    • checkPositive

      static int checkPositive(int value)
    • checkPositive

      static int checkPositive(int value, String message)
    • checkNegative

      static int checkNegative(int value)
    • checkNegative

      static int checkNegative(int value, String message)
    • checkRange

      static int checkRange(int value, int min, int max)
    • checkRange

      static int checkRange(int value, int min, int max, String message)
    • check

      static void check(Precondition precondition)
    • check

      static void check(Precondition precondition, String message)
    • check

      static void check(Precondition precondition, Producer<String> message)
    • require

      static <X extends RuntimeException> void require(Precondition precondition, Producer<? extends X> exception)