Interface ThrowingFunction<T,R>

Type Parameters:
T - the type of the input to the function.
R - the type of the result of the function.
All Superinterfaces:
Function<T,R>
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> extends Function<T,R>
A subclass of Function that allows for thrown exceptions.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default R
    apply(T t)
     
    The functional method to implement.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      default R apply(T t)
      Specified by:
      apply in interface Function<T,R>
    • applyThrows

      R applyThrows(T t) throws Exception
      The functional method to implement.
      Parameters:
      t - The type of the input to the function.
      Returns:
      The type of the result of the function.
      Throws:
      Exception - Any exception.