T
- the typepublic class PredicateWrapper<T> extends Object implements com.google.common.base.Predicate<T>
com.google.common.base.Predicate
but we want to use Predicate
. This
wrapper class encapsulates a java.util.function.Predicate
into a com.google.common.base.Predicate
instance.Constructor and Description |
---|
PredicateWrapper(Predicate<T> predicate)
Constructor assigning the
java.util.function.Predicate to wrap. |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(T input) |
static <T> com.google.common.base.Predicate<T> |
wrap(Predicate<T> predicate)
Utility method that wraps a
Predicate into a com.google.common.base.Predicate . |
public boolean apply(T input)
public static <T> com.google.common.base.Predicate<T> wrap(Predicate<T> predicate)
Predicate
into a com.google.common.base.Predicate
.T
- the type contained in the predicatepredicate
- the predicate to wrapcom.google.common.base.Predicate
instanceCopyright © 2018 Litsec AB. All rights reserved.