public final class PredicateSupport extends Object
| Modifier | Constructor and Description |
|---|---|
private |
PredicateSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> com.google.common.base.Predicate<Iterable<T>> |
allMatch(com.google.common.base.Predicate<T> target)
Creates a predicate that checks that all elements of an
Iterable matches a given target predicate. |
static <T> com.google.common.base.Predicate<Iterable<T>> |
anyMatch(com.google.common.base.Predicate<T> target)
Creates a predicate that checks that any element in an
Iterable matches a given target predicate. |
static com.google.common.base.Predicate<CharSequence> |
caseInsensitiveMatch(String target)
Creates a predicate that checks if a given
CharSequence matches a target string while ignoring case. |
static <T> com.google.common.base.Predicate<T> |
fromFunction(com.google.common.base.Function<T,Boolean> function,
com.google.common.base.Predicate<T> defValue)
Creates a predicate that applies a function to an input and returns its result, or a default value
if null.
|
@Nonnull public static <T> com.google.common.base.Predicate<Iterable<T>> allMatch(@Nonnull com.google.common.base.Predicate<T> target)
Iterable matches a given target predicate.T - type of objects in the iterable and that the target operates upontarget - predicate used to check each element in the iterable@Nonnull public static <T> com.google.common.base.Predicate<Iterable<T>> anyMatch(@Nonnull com.google.common.base.Predicate<T> target)
Iterable matches a given target predicate.T - type of objects in the iterable and that the target operates upontarget - predicate used to check each element in the iterable@Nonnull public static com.google.common.base.Predicate<CharSequence> caseInsensitiveMatch(@Nonnull String target)
CharSequence matches a target string while ignoring case.target - the target string to match against@Nonnull public static <T> com.google.common.base.Predicate<T> fromFunction(@Nonnull com.google.common.base.Function<T,Boolean> function, @Nonnull com.google.common.base.Predicate<T> defValue)
T - type of function inputfunction - function to apply to inputdefValue - default predicate to apply if function returns nullCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.