Interface Predicate<T>

All Superinterfaces:
Predicate<T>, Serializable
All Known Implementing Classes:
CheckedPredicate, DropIterablePredicate, DropWhileIterablePredicate, MapEntryPredicate, PairPredicate, Predicates, Predicates.AllSatisfy, Predicates.AnySatisfy, Predicates.NoneSatisfy
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<T>
extends Predicate<T>, Serializable
A Predicate is a lambda or closure with a boolean result. The method accept should be implemented to indicate the object passed to the method meets the criteria of this Predicate. A Predicate is also known as a Discriminator or Filter.
  • Method Summary

    Modifier and Type Method Description
    boolean accept​(T each)  
    default boolean test​(T each)  

    Methods inherited from interface java.util.function.Predicate

    and, negate, or