接口 Function<T,R>


public interface Function<T,R>
Function functional interface from JDK 8.
  • 方法概要

    修饰符和类型
    方法
    说明
    apply(T t)
    Applies this function to the given argument.
    static <T> Function<T,T>
    Returns a function that always returns its input argument.
  • 方法详细资料

    • apply

      R apply(T t)
      Applies this function to the given argument.
      参数:
      t - the function argument
      返回:
      the function result
    • identity

      static <T> Function<T,T> identity()
      Returns a function that always returns its input argument.
      类型参数:
      T - the type of the input and output objects to the function
      返回:
      a function that always returns its input argument