Interface ExceptionalFunction<I,R,E extends Throwable>

Type Parameters:
I - the input type
R - the result type
E - the exception of your choice
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 ExceptionalFunction<I,R,E extends Throwable>
A generic functional interface that allows you to consume an item, return a result, and potentially throw an exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(I i)
    The method that will be called
  • Method Details

    • apply

      R apply(I i) throws E
      The method that will be called
      Parameters:
      i - the input
      Returns:
      the result of the call
      Throws:
      E - if the call throws an exception