Interface ThrowingFunction<T,R>

Type Parameters:
T - input type
R - result 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 ThrowingFunction<T,R>
Like Function<T, R> but allows checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T t)
    Applies the function.
  • Method Details

    • apply

      R apply(T t) throws Exception
      Applies the function.
      Parameters:
      t - input value
      Returns:
      result
      Throws:
      Exception - if any error occurs