Package de.xima.fc.interfaces
Interface ISerializableThrowingBiFunction<T,U,R>
-
- Type Parameters:
T
- the type of the first argument to the functionU
- the type of the second argument to the functionR
- the type of the result of the function
- All Superinterfaces:
BiFunction<T,U,R>
,IThrowingBiFunction<T,U,R>
,Serializable
- 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 ISerializableThrowingBiFunction<T,U,R> extends IThrowingBiFunction<T,U,R>, Serializable
ABiFunction
that is also serializable and can throw exceptions.Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of
Function
.This is a
functional interface
whose functional method isIThrowingBiFunction.tryApply(Object, Object)
.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
Static Methods Modifier and Type Method Description static <T,U,R>
ISerializableThrowingBiFunction<T,U,R>SerializableThrowingBiFunction(ISerializableThrowingBiFunction<T,U,R> fn)
Returns the given function, for improved variable inference.-
Methods inherited from interface java.util.function.BiFunction
andThen
-
Methods inherited from interface de.xima.fc.interfaces.IThrowingBiFunction
apply, tryApply
-
-
-
-
Method Detail
-
SerializableThrowingBiFunction
static <T,U,R> ISerializableThrowingBiFunction<T,U,R> SerializableThrowingBiFunction(ISerializableThrowingBiFunction<T,U,R> fn)
Returns the given function, for improved variable inference. Sometimes you need to create local variables and assign them to a new lambda. This does not work well with variable inference, as Java cannot infer the type of an anonymous lambda. This utility method lets you write slightly more readable code like this:final var fn = serializableThrowingBiFunction((t, u) -> ...);
- Type Parameters:
T
- the type of the first argument to the functionU
- the type of the second argument to the functionR
- the type of the result of the function- Parameters:
fn
- Function to return.- Returns:
- The given function.
-
-