public final class TransformerUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TransformerUtils.Transformer<OUT,IN> |
Modifier and Type | Method and Description |
---|---|
static <A,B,C> TransformerUtils.Transformer<C,A> |
compose(Transformer<C,B> g,
Transformer<? extends B,A> f) |
static <T> TransformerUtils.Transformer<T,T> |
configureInPlace(Action<? super T> action) |
static <T,U> TransformerUtils.Transformer<T,U> |
constant(T value) |
static <OUT,IN> TransformerUtils.Transformer<List<OUT>,Iterable<IN>> |
flatTransformEach(Transformer<? extends Iterable<OUT>,? super IN> mapper)
Adapts an flat element mapper to transform each elements individually of the collection.
|
static <T> TransformerUtils.Transformer<T,T> |
noOpTransformer() |
static <T> TransformerUtils.Transformer<List<T>,Iterable<T>> |
toListTransformer() |
static <T> TransformerUtils.Transformer<Set<T>,Iterable<T>> |
toSetTransformer() |
static <OUT,IN> TransformerUtils.Transformer<Set<OUT>,Iterable<IN>> |
toSetTransformer(Class<OUT> type) |
static <OUT,IN> TransformerUtils.Transformer<List<OUT>,Iterable<IN>> |
transformEach(Transformer<? extends OUT,? super IN> mapper)
Adapts an element mapper to transform each elements individually of the collection.
|
public static <T> TransformerUtils.Transformer<T,T> noOpTransformer()
public static <T> TransformerUtils.Transformer<List<T>,Iterable<T>> toListTransformer()
public static <T> TransformerUtils.Transformer<Set<T>,Iterable<T>> toSetTransformer()
public static <OUT,IN> TransformerUtils.Transformer<Set<OUT>,Iterable<IN>> toSetTransformer(Class<OUT> type)
public static <T,U> TransformerUtils.Transformer<T,U> constant(T value)
public static <T> TransformerUtils.Transformer<T,T> configureInPlace(Action<? super T> action)
public static <OUT,IN> TransformerUtils.Transformer<List<OUT>,Iterable<IN>> flatTransformEach(Transformer<? extends Iterable<OUT>,? super IN> mapper)
OUT
- output element type resulting from the transformIN
- input element type to transformmapper
- an element mapperTransformerUtils.Transformer
instance to flat transform each the element of an iterable, never null.public static <OUT,IN> TransformerUtils.Transformer<List<OUT>,Iterable<IN>> transformEach(Transformer<? extends OUT,? super IN> mapper)
OUT
- output element type resulting from the transformIN
- input element type to transformmapper
- an element mapperTransformerUtils.Transformer
instance to transform each the element of an iterable, never null.public static <A,B,C> TransformerUtils.Transformer<C,A> compose(Transformer<C,B> g, Transformer<? extends B,A> f)