?? Function<T,R>

????:
T - The type of the function input.
R - The type of the function output.
????:
????????, ????? lambda ??????????????

@ConsumerType @FunctionalInterface public interface Function<T,R>
A function that accepts a single argument and produces a result.

This is a functional interface and can be used as the assignment target for a lambda expression or method reference.

  • ????

    ??????
    ??
    ??
    apply(T t)
    Applies this function to the specified argument.
  • ??????

    • apply

      R apply(T t) throws Exception
      Applies this function to the specified argument.
      ??:
      t - The input to this function.
      ??:
      The output of this function.
      ??:
      Exception - An exception thrown by the method.