Module io.jooby
Package io.jooby

Interface SneakyThrows.Function<V,R>

Type Parameters:
V - Input type.
R - Output type.
All Superinterfaces:
Function<V,R>
Enclosing class:
SneakyThrows
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 SneakyThrows.Function<V,R> extends Function<V,R>
Throwable version of Function.

The apply(Object) method throws checked exceptions using SneakyThrows.propagate(Throwable) method.

  • Method Summary

    Modifier and Type
    Method
    Description
    default R
    apply(V v)
    Apply this function to the given argument and produces a result.
    tryApply(V value)
    Apply this function to the given argument and produces a result.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • tryApply

      R tryApply(V value) throws Exception
      Apply this function to the given argument and produces a result.
      Parameters:
      value - Input argument.
      Returns:
      Result.
      Throws:
      Exception - If something goes wrong.
    • apply

      default R apply(V v)
      Apply this function to the given argument and produces a result.
      Specified by:
      apply in interface Function<V,R>
      Parameters:
      v - Input argument.
      Returns:
      Result.