Package com.pivovarit.function
Interface ThrowingBiFunction<T1,T2,R,E extends java.lang.Exception>
-
- Type Parameters:
T1
- the type of the first argument to the functionT2
- the type of the second argument to the functionR
- the type of the result of the functionE
- the type of the thrown checked exception
- All Known Subinterfaces:
ThrowingBinaryOperator<T,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 interface ThrowingBiFunction<T1,T2,R,E extends java.lang.Exception>
Represents a function that accepts two arguments and produces a result. This is the two-arity specialization ofThrowingFunction
. Function may throw a checked exception.- See Also:
ThrowingFunction
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> ThrowingBiFunction<T1,T2,V,E>
andThen(ThrowingFunction<? super R,? extends V,? extends E> after)
Performs provided action on the result of this ThrowingBiFunction instanceR
apply(T1 arg1, T2 arg2)
default java.util.function.BiFunction<T1,T2,java.util.Optional<R>>
lift()
static <T1,T2,R>
java.util.function.BiFunction<T1,T2,java.util.Optional<R>>lifted(ThrowingBiFunction<T1,T2,R,?> f)
static <T1,T2,R>
java.util.function.BiFunction<T1,T2,R>sneaky(ThrowingBiFunction<? super T1,? super T2,? extends R,?> function)
default java.util.function.BiFunction<T1,T2,R>
unchecked()
static <T1,T2,R>
java.util.function.BiFunction<T1,T2,R>unchecked(ThrowingBiFunction<T1,T2,R,?> function)
-
-
-
Method Detail
-
apply
R apply(T1 arg1, T2 arg2) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
unchecked
static <T1,T2,R> java.util.function.BiFunction<T1,T2,R> unchecked(ThrowingBiFunction<T1,T2,R,?> function)
-
sneaky
static <T1,T2,R> java.util.function.BiFunction<T1,T2,R> sneaky(ThrowingBiFunction<? super T1,? super T2,? extends R,?> function)
-
lifted
static <T1,T2,R> java.util.function.BiFunction<T1,T2,java.util.Optional<R>> lifted(ThrowingBiFunction<T1,T2,R,?> f)
-
andThen
default <V> ThrowingBiFunction<T1,T2,V,E> andThen(ThrowingFunction<? super R,? extends V,? extends E> after)
Performs provided action on the result of this ThrowingBiFunction instance- Type Parameters:
V
- after function's result type- Parameters:
after
- action that is supposed to be made on the result of apply()- Returns:
- combined function
-
-