Interface Function2<A,B,R>

Type Parameters:
A - type of first function parameter
B - type of second function parameter
R - type of return value
All Superinterfaces:
Recoverable
All Known Subinterfaces:
Operator2<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 interface Function2<A,B,R> extends Recoverable

This interface represents a function with a two parameters. Similar to BiFunction.

The function can throws checked exceptions, but calling apply() method, the exception is sneaky thrown. So, it can be used as a higher order function in Stream or Optional API.