Class PredicateSupport
java.lang.Object
net.shibboleth.utilities.java.support.logic.PredicateSupport
Deprecated, for removal: This API element is subject to removal in a future version.
Legacy stub for
PredicateSupport.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDeprecated, for removal: This API element is subject to removal in a future version.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks that all elements of anIterablematches a given target predicate.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue.Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks that any element in anIterablematches a given target predicate.static Predicate<CharSequence>caseInsensitiveMatch(String target) Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks if a givenCharSequencematches a target string while ignoring case.static <T> Predicate<T>fromFunction(Function<T, Boolean> function, Predicate<? super T> defValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that applies a function to an input and returns its result, or a default value if null.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif the given predicate evaluates tofalse.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue.static <T> Predicate<T>Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue.
-
Constructor Details
-
PredicateSupport
private PredicateSupport()Deprecated, for removal: This API element is subject to removal in a future version.Constructor.
-
-
Method Details
-
allMatch
Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks that all elements of anIterablematches a given target predicate.- Type Parameters:
T- type of objects in the iterable and that the target operates upon- Parameters:
target- predicate used to check each element in the iterable- Returns:
- the constructed predicate
-
anyMatch
Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks that any element in anIterablematches a given target predicate.- Type Parameters:
T- type of objects in the iterable and that the target operates upon- Parameters:
target- predicate used to check each element in the iterable- Returns:
- the constructed predicate
-
caseInsensitiveMatch
Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that checks if a givenCharSequencematches a target string while ignoring case.- Parameters:
target- the target string to match against- Returns:
- the constructed predicate
-
fromFunction
@Nonnull public static <T> Predicate<T> fromFunction(@Nonnull Function<T, Boolean> function, @Nonnull Predicate<? super T> defValue) Deprecated, for removal: This API element is subject to removal in a future version.Creates a predicate that applies a function to an input and returns its result, or a default value if null.- Type Parameters:
T- type of function input- Parameters:
function- function to apply to inputdefValue- default predicate to apply if function returns null- Returns:
- a predicate adapter
- Since:
- 7.4.0
-
not
Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif the given predicate evaluates tofalse.- Type Parameters:
T- predicate input type- Parameters:
predicate- the predicate to negate- Returns:
- the negated predicate
-
and
@Nonnull public static <T> Predicate<T> and(@Nonnull Iterable<? extends Predicate<? super T>> components) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a false predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate totrue.- Type Parameters:
T- predicate input type- Parameters:
components- the predicates to combine- Returns:
- the composite predicate
-
and
@SafeVarargs @Nonnull public static <T> Predicate<T> and(@Nonnull Predicate<? super T>... components) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a false predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate totrue.- Type Parameters:
T- predicate input type- Parameters:
components- the predicates to combine- Returns:
- the composite predicate
-
and
@Nonnull public static <T> Predicate<T> and(@Nonnull Predicate<? super T> first, @Nonnull Predicate<? super T> second) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif each of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a false predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate totrue.- Type Parameters:
T- predicate input type- Parameters:
first- the first predicatesecond- the second predicate- Returns:
- the composite predicate
-
or
@Nonnull public static <T> Predicate<T> or(@Nonnull Iterable<? extends Predicate<? super T>> components) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a true predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate tofalse.- Type Parameters:
T- predicate input type- Parameters:
components- the predicates to combine- Returns:
- the composite predicate
-
or
@SafeVarargs @Nonnull public static <T> Predicate<T> or(@Nonnull Predicate<? super T>... components) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a true predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate tofalse.- Type Parameters:
T- predicate input type- Parameters:
components- the predicates to combine- Returns:
- the composite predicate
-
or
@Nonnull public static <T> Predicate<T> or(@Nonnull Predicate<? super T> first, @Nonnull Predicate<? super T> second) Deprecated, for removal: This API element is subject to removal in a future version.Returns a predicate that evaluates totrueif any one of its components evaluates totrue. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a true predicate is found. It defensively copies the iterable passed in, so future changes to it won't alter the behavior of this predicate. Ifcomponentsis empty, the returned predicate will always evaluate tofalse.- Type Parameters:
T- predicate input type- Parameters:
first- the first predicatesecond- the second predicate- Returns:
- the composite predicate
-