Interface Predicate

All Superinterfaces:
BooleanSupplier
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 Predicate extends BooleanSupplier
A boolean predicate.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns this.test().
    boolean
    Determine if the predicate is true.
  • Method Details

    • test

      boolean test()
      Determine if the predicate is true.
      Returns:
      true if predicate is true, otherwise false
    • getAsBoolean

      default boolean getAsBoolean()
      Returns this.test().
      Specified by:
      getAsBoolean in interface BooleanSupplier
      Returns:
      result of test