Interface BooleanSupplier

All Superinterfaces:
BooleanSupplier

public interface BooleanSupplier extends BooleanSupplier
An enhanced boolean supplier.
Author:
Paul Ferraro
  • Field Details

  • Method Details

    • handle

      default BooleanSupplier handle(Predicate<RuntimeException> handler)
      Returns a new supplier that delegates to this supplier using the specified exception handler.
      Parameters:
      handler - an exception handler
      Returns:
      a new supplier that delegates to this supplier using the specified exception handler.
    • of

      static BooleanSupplier of(boolean value)
      Returns a supplier that always returns the specified value.
      Parameters:
      value - the supplied value
      Returns:
      a supplier that always returns the specified value.
    • of

      static <T> BooleanSupplier of(Predicate<T> predicate, Supplier<T> supplier)
      Returns a boolean supplier that evaluates a predicate against a supplied value.
      Parameters:
      predicate - a predicate use to evaluate the supplied value
      supplier - a supplier of the value to test
      Returns:
      a boolean supplier that evaluates a predicate against a supplied value.
    • of

      static <T, U> BooleanSupplier of(BiPredicate<T,U> predicate, Supplier<T> formerSupplier, Supplier<U> latterSupplier)
      Returns a boolean supplier that evaluates a predicate against a supplied value.
      Parameters:
      predicate - a predicate used to evaluate the supplied values
      formerSupplier - a supplier of the former value to test
      latterSupplier - a supplier of the latter value to test
      Returns:
      a boolean supplier that evaluates a predicate against a supplied value.