Interface BooleanSupplier

All Superinterfaces:
BooleanSupplier

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

    • TRUE

      static final BooleanSupplier TRUE
      A supplier that always returns true
    • FALSE

      static final BooleanSupplier FALSE
      A supplier that always returns false
  • Method Details

    • negate

      default BooleanSupplier negate()
      Returns a supplier that return this negation of this supplier.
      Returns:
      a supplier that return this negation of this supplier.
    • boxed

      default Supplier<Boolean> boxed()
      Returns a boxed version of this supplier.
      Returns:
      a boxed version of this supplier.
    • 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.