Class PredicateSupport

java.lang.Object
net.shibboleth.utilities.java.support.logic.PredicateSupport

@Deprecated(since="9.0.0", forRemoval=true) public final class PredicateSupport extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Legacy stub for PredicateSupport.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Predicate<Iterable<T>>
    allMatch(Predicate<T> target)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a predicate that checks that all elements of an Iterable matches a given target predicate.
    static <T> Predicate<T>
    and(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 to true if each of its components evaluates to true.
    static <T> Predicate<T>
    and(Predicate<? super T>... components)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a predicate that evaluates to true if each of its components evaluates to true.
    static <T> Predicate<T>
    and(Predicate<? super T> first, Predicate<? super T> second)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a predicate that evaluates to true if each of its components evaluates to true.
    static <T> Predicate<Iterable<T>>
    anyMatch(Predicate<T> target)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a predicate that checks that any element in an Iterable matches a given target predicate.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a predicate that checks if a given CharSequence matches 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>
    not(Predicate<? super T> predicate)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a predicate that evaluates to true if the given predicate evaluates to false.
    static <T> Predicate<T>
    or(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 to true if any one of its components evaluates to true.
    static <T> Predicate<T>
    or(Predicate<? super T>... components)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a predicate that evaluates to true if any one of its components evaluates to true.
    static <T> Predicate<T>
    or(Predicate<? super T> first, Predicate<? super T> second)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a predicate that evaluates to true if any one of its components evaluates to true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PredicateSupport

      private PredicateSupport()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
  • Method Details

    • allMatch

      @Nonnull public static <T> Predicate<Iterable<T>> allMatch(@Nonnull Predicate<T> target)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a predicate that checks that all elements of an Iterable matches 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

      @Nonnull public static <T> Predicate<Iterable<T>> anyMatch(@Nonnull Predicate<T> target)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a predicate that checks that any element in an Iterable matches 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

      @Nonnull public static Predicate<CharSequence> caseInsensitiveMatch(@Nonnull String target)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a predicate that checks if a given CharSequence matches 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 input
      defValue - default predicate to apply if function returns null
      Returns:
      a predicate adapter
      Since:
      7.4.0
    • not

      @Nonnull public static <T> Predicate<T> not(@Nonnull Predicate<? super T> predicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a predicate that evaluates to true if the given predicate evaluates to false.
      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 to true if each of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to true.
      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 to true if each of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to true.
      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 to true if each of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to true.
      Type Parameters:
      T - predicate input type
      Parameters:
      first - the first predicate
      second - 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 to true if any one of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to false.
      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 to true if any one of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to false.
      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 to true if any one of its components evaluates to true. 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. If components is empty, the returned predicate will always evaluate to false.
      Type Parameters:
      T - predicate input type
      Parameters:
      first - the first predicate
      second - the second predicate
      Returns:
      the composite predicate