public final class Functions
extends java.lang.Object
Function- and FunctionWhichThrows-related utility methods.| Modifier and Type | Method and Description |
|---|---|
static <I,O,EX extends java.lang.RuntimeException> |
asFunction(FunctionWhichThrows<? super I,? extends O,EX> source)
Converts a
FunctionWhichThrows into a Function. |
static <I,O,EX extends java.lang.Throwable> |
asFunctionWhichThrows(Function<? super I,? extends O> source)
Converts a
Function into a FunctionWhichThrows. |
static <O,I extends O> |
identity() |
public static <O,I extends O> Function<I,O> identity()
Function that transforms any object reference to itself.public static <I,O,EX extends java.lang.Throwable> FunctionWhichThrows<I,O,EX> asFunctionWhichThrows(Function<? super I,? extends O> source)
Function into a FunctionWhichThrows.
That is possible iff:
I - The functions' input typeO - The functions' output typeEX - The target function's exceptionpublic static <I,O,EX extends java.lang.RuntimeException> Function<I,O> asFunction(FunctionWhichThrows<? super I,? extends O,EX> source)
FunctionWhichThrows into a Function.
That is possible iff:
RuntimeException.
I - The functions' input typeO - The functions' output typeEX - The source function's exception