T - Operand type.R - Result type.public interface InvertibleFunction<T,R>
extends java.util.function.Function<T,R>
| Modifier and Type | Method and Description |
|---|---|
static <T,I,R> InvertibleFunction<T,R> |
compose(InvertibleFunction<T,I> first,
InvertibleFunction<I,R> second) |
InvertibleFunction<R,T> |
getInverse()
This returns the mathematical inverse of the receiving function.
|
static <T,R> InvertibleFunction<T,R> |
over(java.util.function.Function<? super T,? extends R> function,
java.util.function.Function<? super R,? extends T> reverse) |
InvertibleFunction<R,T> getInverse()
static <T,R> InvertibleFunction<T,R> over(java.util.function.Function<? super T,? extends R> function, java.util.function.Function<? super R,? extends T> reverse)
T - The operand type of the forward function, and the result type of
its reverse.R - The result type of the forward function, and the operand type of
its reverse.function - The function in forward direction.reverse - The reverse of the function.static <T,I,R> InvertibleFunction<T,R> compose(InvertibleFunction<T,I> first, InvertibleFunction<I,R> second)
T - The operand type of the first function.I - An intermediate type which the result type of the first function
can be assigned to, and which can assign to the operand type of
the second function.R - The result type of the second function.first - The first function to compose.second - The second function to compose.