org.apache.commons.lang3.function

## Interface FailablePredicate<T,E extends Throwable>

- Type Parameters:
    `T` - Predicate type.
    `E` - The kind of thrown exception or error.
  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 FailablePredicate<T,E extends Throwable>

  A functional interface like `Predicate` that declares a `Throwable`.
  Since:
    3.11

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FailablePredicate` | `FALSE` FALSE singleton
    `static FailablePredicate` | `TRUE` TRUE singleton

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default FailablePredicate<T,E>` | `and(FailablePredicate<? super T,E> other)` Returns a composed `FailablePredicate` like `Predicate.and(Predicate)`.
    `static <T,E extends Throwable> FailablePredicate<T,E>` | `falsePredicate()` Returns The FALSE singleton.
    `default FailablePredicate<T,E>` | `negate()` Returns a predicate that negates this predicate.
    `default FailablePredicate<T,E>` | `or(FailablePredicate<? super T,E> other)` Returns a composed `FailablePredicate` like `Predicate.and(Predicate)`.
    `boolean` | `test(T object)` Tests the predicate.
    `static <T,E extends Throwable> FailablePredicate<T,E>` | `truePredicate()` Returns The TRUE singleton.

- - ### Field Detail

    - #### FALSE

          static final FailablePredicate FALSE

      FALSE singleton

    - #### TRUE

          static final FailablePredicate TRUE

      TRUE singleton

  - ### Method Detail

    - #### falsePredicate

          static <T,E extends Throwable> FailablePredicate<T,E> falsePredicate()

      Returns The FALSE singleton.
      Type Parameters:
        `T` - Predicate type.
        `E` - The kind of thrown exception or error.
      Returns:
        The NOP singleton.

    - #### truePredicate

          static <T,E extends Throwable> FailablePredicate<T,E> truePredicate()

      Returns The TRUE singleton.
      Type Parameters:
        `T` - Predicate type.
        `E` - The kind of thrown exception or error.
      Returns:
        The NOP singleton.

    - #### and

          default FailablePredicate<T,E> and(FailablePredicate<? super T,E> other)

      Returns a composed `FailablePredicate` like `Predicate.and(Predicate)`.
      Parameters:
        `other` - a predicate that will be logically-ANDed with this predicate.
      Returns:
        a composed `FailablePredicate` like `Predicate.and(Predicate)`.
      Throws:
        `NullPointerException` - if other is null

    - #### negate

          default FailablePredicate<T,E> negate()

      Returns a predicate that negates this predicate.
      Returns:
        a predicate that negates this predicate.

    - #### or

          default FailablePredicate<T,E> or(FailablePredicate<? super T,E> other)

      Returns a composed `FailablePredicate` like `Predicate.and(Predicate)`.
      Parameters:
        `other` - a predicate that will be logically-ORed with this predicate.
      Returns:
        a composed `FailablePredicate` like `Predicate.and(Predicate)`.
      Throws:
        `NullPointerException` - if other is null

    - #### test

          boolean test(T object)
                throws E extends Throwable

      Tests the predicate.
      Parameters:
        `object` - the object to test the predicate on
      Returns:
        the predicate's evaluation
      Throws:
        `E` - if the predicate fails
        `E extends Throwable`

Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.