Interface RefToBooleanFunction<I>

Type Parameters:
I - The input type.
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 RefToBooleanFunction<I>
A function that accepts an Object and returns a boolean.
Since:
1.2
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    apply(I e)
    Applies the function.
    Returns an RefToBooleanFunction that represents !this.apply(e).
    static <I> RefToBooleanFunction<I>
    Returns an RefToBooleanFunction that represents !func.apply(e).
  • Method Details

    • apply

      boolean apply(I e)
      Applies the function.
      Parameters:
      e - The argument.
      Returns:
      The result.
    • negate

      default RefToBooleanFunction<I> negate()
      Returns an RefToBooleanFunction that represents !this.apply(e).
      Returns:
      The logical negation of this function.
    • not

      static <I> RefToBooleanFunction<I> not(RefToBooleanFunction<I> func)
      Returns an RefToBooleanFunction that represents !func.apply(e).
      Type Parameters:
      I - The input type of the function.
      Parameters:
      func - The function to negate. Must not be null.
      Returns:
      The logical negation of the specified function.
      Throws:
      NullPointerException - If the specified function is null.