Class FunctionSupport

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

@Deprecated(since="9.0.0", forRemoval=true) public final class FunctionSupport extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Legacy stub for FunctionSupport.
  • 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 <A, B, C> Function<A,C>
    compose(Function<? super B,? extends C> g, Function<A,? extends B> f)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the composition of two functions.
    static <T1, T2> Function<T1,T2>
    constant(T2 target)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a function that returns a constant value.
    static <T> Function<T,Boolean>
    forPredicate(Predicate<T> predicate)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a function that returns the same boolean output as the given predicate for all inputs.

    Methods inherited from class java.lang.Object

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

    • FunctionSupport

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

    • constant

      @Nonnull public static <T1, T2> Function<T1,T2> constant(@Nullable @ParameterName(name="target") T2 target)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a function that returns a constant value.
      Type Parameters:
      T1 - type of object the function needs to act on
      T2 - type of object being returned
      Parameters:
      target - the value to return from the function
      Returns:
      the constructed function
    • compose

      @Nonnull public static <A, B, C> Function<A,C> compose(@Nonnull @ParameterName(name="g") Function<? super B,? extends C> g, @Nonnull @ParameterName(name="f") Function<A,? extends B> f)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the composition of two functions. For f: A->B and g: B->C, composition is defined as the function h such that h(a) == g(f(a)) for each a.
      Type Parameters:
      A - input to composed function
      B - output of inner function
      C - output of composed function
      Parameters:
      g - the second function to apply
      f - the first function to apply
      Returns:
      the composition of f and g
      See Also:
    • forPredicate

      @Nonnull public static <T> Function<T,Boolean> forPredicate(@Nonnull @ParameterName(name="predicate") Predicate<T> predicate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a function that returns the same boolean output as the given predicate for all inputs.

      Primarily provided for Spring wiring use cases that can't express a method reference.

      Type Parameters:
      T - input type
      Parameters:
      predicate - input predicate
      Returns:
      a corresponding function