T1 - type of object used as the source of the data to compareT2 - type of object being comparedpublic class StrategyIndirectedPredicate<T1,T2>
extends java.lang.Object
implements com.google.common.base.Predicate<T1>
Object returned by a lookup function
against an injected predicate.| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<T1,T2> |
objectLookupStrategy
Lookup strategy for object.
|
private com.google.common.base.Predicate<T2> |
predicate
Predicate to apply to indirected object.
|
| Constructor and Description |
|---|
StrategyIndirectedPredicate(com.google.common.base.Function<T1,T2> objectStrategy,
java.util.Collection<T2> collection)
Constructor that simplifies constructing a test for containment in a collection, which
is a common use case.
|
StrategyIndirectedPredicate(com.google.common.base.Function<T1,T2> objectStrategy,
com.google.common.base.Predicate<T2> pred)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(T1 input) |
@Nonnull private final com.google.common.base.Function<T1,T2> objectLookupStrategy
@Nonnull private final com.google.common.base.Predicate<T2> predicate
public StrategyIndirectedPredicate(@Nonnull
com.google.common.base.Function<T1,T2> objectStrategy,
@Nonnull
com.google.common.base.Predicate<T2> pred)
objectStrategy - lookup strategy for objectpred - the predicate to applypublic StrategyIndirectedPredicate(@Nonnull
com.google.common.base.Function<T1,T2> objectStrategy,
@Nonnull @NonnullElements
java.util.Collection<T2> collection)
objectStrategy - lookup strategy for objectcollection - a collection to test for containment