public class Predicates extends Object
Constructor and Description |
---|
Predicates() |
Modifier and Type | Method and Description |
---|---|
static Function<Predicate,Predicate> |
and(Predicate presetPredicate)
Creates a
Function which, when called, creates an AndPredicate of
its input and the presetPredicate . |
static Optional<Predicate> |
anyOf(Collection<? extends Predicate> predicates)
Creates an
OrPredicate of the given predicates if any. |
public static Optional<Predicate> anyOf(Collection<? extends Predicate> predicates)
OrPredicate
of the given predicates if any.predicates
- collection of predicates to be OR-edOptional
of the OrPredicate
if any predicates are given,
otherwise an empty Optional
public static Function<Predicate,Predicate> and(Predicate presetPredicate)
Function
which, when called, creates an AndPredicate
of
its input and the presetPredicate
. The function can then be used to transform
Optional
s or streams.presetPredicate
- this predicate will be AND-ed with the input to the Function
Function
Copyright © 2022 Apache Software Foundation. All rights reserved.