Interface ThrowingFunction<I,​R,​T extends Throwable>

  • Type Parameters:
    I - the type of the input of the function
    R - the type of the result of the function
    T - the type of the exception the accept method may throw
    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<I,​R,​T extends Throwable>
    Represents a function that accepts a single arguments, produces a result and may thrown an exception.
    See Also:
    Function
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      R apply​(I in)
      Applies this function to the given argument, potentially throwing an exception.
    • Method Detail

      • apply

        R apply​(I in)
         throws T extends Throwable
        Applies this function to the given argument, potentially throwing an exception.
        Parameters:
        in - the function argument
        Returns:
        the function result
        Throws:
        T - the exception that may be thrown
        T extends Throwable