Predicate<T>

Description

Useful for checking if an input argument satisfies some condition

Abstract method

test

default method(s)

and, negate, and or

Popular usage

As a parameter to Stream’s methods, like filter and anyMatch

Primitive specializations

IntPredicate, LongPredicate, DoublePredicate, …

Get Functional Programming in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.