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) |
static <T> Function<Pair<T,T>,java.util.List<T>> |
pairToList()
Deprecated.
replaced by PairFn#toList();
|
static <T> Function<Pair<T,T>,java.util.Set<T>> |
pairToSet()
Deprecated.
replaced by PairFn#toSet();
|
static <T> Function<Triple<T,T,T>,java.util.List<T>> |
tripleToList()
Deprecated.
replaced by TripleFn#toList();
|
static <T> Function<Triple<T,T,T>,java.util.Set<T>> |
tripleToSet()
Deprecated.
replaced by TripleFn#toSet();
|
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)
@Deprecated public static <T> Function<Pair<T,T>,java.util.List<T>> pairToList()
@Deprecated public static <T> Function<Pair<T,T>,java.util.Set<T>> pairToSet()
@Deprecated public static <T> Function<Triple<T,T,T>,java.util.List<T>> tripleToList()