public static final class Fn.Functions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T,R> Function<T,Optional<R>> |
create(Consumer<? super T> action)
Returns a
Function which calls the specified action and always return an emptyOptional if action is executed successfully. |
static <T,U,R> Function<T,R> |
create(U u,
BiFunction<? super T,? super U,R> func) |
static <T,R> Function<T,R> |
indexed(IndexedFunction<T,R> func) |
public static <T,U,R> Function<T,R> create(U u, BiFunction<? super T,? super U,R> func)
public static <T,R> Function<T,Optional<R>> create(Consumer<? super T> action)
Function
which calls the specified action
and always return an emptyOptional
if action
is executed successfully.action
- public static <T,R> Function<T,R> indexed(IndexedFunction<T,R> func)