Interface Function<T,R>

Type Parameters:
T - the input value type
R - the output value type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Function<@NonNull T, @NonNull R>
A functional interface that takes a value and returns another value, possibly with a different type and allows throwing a checked exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    Apply some calculation to the input value and return some other value.
  • Method Details

    • apply

      R apply(@NonNull T t) throws Throwable
      Apply some calculation to the input value and return some other value.
      Parameters:
      t - the input value
      Returns:
      the output value
      Throws:
      Throwable - if the implementation wishes to throw any type of exception