Predicates<T> extension

Contains functions for composing Predicates and other operations.

on

Methods

and(Predicate<T> other) Predicate<T>
Returns a composed Predicate that represents a short-circuiting logical AND of this Predicate and other.
map<R>(Mapper<bool, R> next) Mapper<T, R>
Returns a composed Mapper that calls this Predicate and applies the result to next.
negate() Predicate<T>
Returns a Predicate that represents a negation of this Predicate.
or(Predicate<T> other) Predicate<T>
Returns a composed Predicate that represents a short-circuiting logical OR of this Predicate and other.
pipe(Consumer<bool> consumer) Consumer<T>
Returns a composed Mapper that calls this Predicate and applies the result to consumer.