Interface ValueOrError.ThrowingFunction<T,R,X extends Exception>

Type Parameters:
T - the input type
R - the result type
X - the exception type
Enclosing class:
ValueOrError<R,E>
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 static interface ValueOrError.ThrowingFunction<T,R,X extends Exception>
A function that accepts one argument and may throw a checked exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T value)
    Applies this function to the given value.
  • Method Details

    • apply

      R apply(T value) throws X
      Applies this function to the given value.
      Parameters:
      value - the input value
      Returns:
      the function result
      Throws:
      X - when the function fails