public final class Functional extends Object
Functional-style utilities to go with Guava.
Modifier and Type | Method and Description |
---|---|
static <F,T> Function<F,T> |
cast(Class<T> target)
Identity function casting its arguments to a particular type.
|
static <T> Function<T,Equivalence.Wrapper<T>> |
equivWrap(Equivalence<T> equiv)
A function that wraps objects according to an equivalence relation.
|
static Funnel<Object> |
serializeFunnel()
A
Funnel that serializes an object to the sink. |
public static <T> Function<T,Equivalence.Wrapper<T>> equivWrap(Equivalence<T> equiv)
A function that wraps objects according to an equivalence relation.
equiv
- The equivalence.T
- The type of object to wrap.Equivalence.wrap(Object)
public static Funnel<Object> serializeFunnel()
A Funnel
that serializes an object to the sink.
public static <F,T> Function<F,T> cast(Class<T> target)
Identity function casting its arguments to a particular type.
F
- The function’s input type.T
- The type to which to cast arguments.target
- The target type for arguments.