Module io.jooby
Package io.jooby

Interface SneakyThrows.Function2<V1,V2,R>

Type Parameters:
V1 - Input type.
V2 - Input type.
R - Output type.
All Superinterfaces:
BiFunction<V1,V2,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.Function2<V1,V2,R> extends BiFunction<V1,V2,R>
Throwable version of BiFunction.

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

  • Method Summary

    Modifier and Type
    Method
    Description
    default R
    apply(V1 v1, V2 v2)
    Apply this function to the given argument and produces a result.
    tryApply(V1 v1, V2 v2)
    Apply this function to the given argument and produces a result.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • tryApply

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

      default R apply(V1 v1, V2 v2)
      Apply this function to the given argument and produces a result.
      Specified by:
      apply in interface BiFunction<V1,V2,R>
      Parameters:
      v1 - Input argument.
      v2 - Input argument.
      Returns:
      Result.