T1 - type of object used as the source of the data to compareT2 - type of object being comparedpublic class StrategyIndirectedPredicate<T1,T2> extends Object implements Predicate<T1>
Object returned by a lookup function
against an injected predicate.| Modifier and Type | Field and Description |
|---|---|
private Function<T1,T2> |
objectLookupStrategy
Lookup strategy for object.
|
private Predicate<T2> |
predicate
Predicate to apply to indirected object.
|
| Constructor and Description |
|---|
StrategyIndirectedPredicate(Function<T1,T2> objectStrategy,
Collection<T2> collection)
Constructor that simplifies constructing a test for containment in a collection, which
is a common use case.
|
StrategyIndirectedPredicate(Function<T1,T2> objectStrategy,
Predicate<T2> pred)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(T1 input) |
static StrategyIndirectedPredicate |
forCollection(Function objectStrategy,
Collection collection)
Factory method for collection-based constructor.
|
static StrategyIndirectedPredicate |
forPredicate(Function objectStrategy,
Predicate pred)
Factory method for predicate-based constructor.
|
@Nonnull private final Function<T1,T2> objectLookupStrategy
public StrategyIndirectedPredicate(@Nonnull Function<T1,T2> objectStrategy, @Nonnull Predicate<T2> pred)
objectStrategy - lookup strategy for objectpred - the predicate to applypublic StrategyIndirectedPredicate(@Nonnull Function<T1,T2> objectStrategy, @Nonnull Collection<T2> collection)
objectStrategy - lookup strategy for objectcollection - a collection to test for containment@Nonnull public static StrategyIndirectedPredicate forPredicate(@Nonnull Function objectStrategy, @Nonnull Predicate pred)
objectStrategy - the lookup strategy for objectpred - the predicate to apply@Nonnull public static StrategyIndirectedPredicate forCollection(@Nonnull Function objectStrategy, @Nonnull Collection collection)
objectStrategy - the lookup strategy for objectcollection - a collection to test for containmentCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.