Interface Try.ThrowingFunction<T,R>

Type Parameters:
T - The input type.
R - The result type.
Enclosing class:
Try<T>
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 Try.ThrowingFunction<T,R>
A functional interface for a function that maps an input to an output and may throw an exception.
  • Method Summary

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

    • apply

      R apply(T t) throws Throwable
      Applies the function to the given input.
      Parameters:
      t - The input value.
      Returns:
      The mapped result.
      Throws:
      Throwable - If the mapping logic fails.