public interface ClusterElementTransformer
A transformer for clusters (iterable, iterator, array) to collections with transformations on each element of the input group.
| Modifier and Type | Method and Description |
|---|---|
static ClusterElementTransformer |
create()
Creates a new transformer.
|
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(Iterable<T3> input,
Transformer<T1,T2> transformer,
IsCollectionStrategy<S,T2> strategy)
Converts the input
iterable to a collection applying a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(Iterable<T3> input,
Transformer<T1,T2> transformer,
Predicate<T3> predicate,
IsCollectionStrategy<S,T2> strategy)
Converts the input
iterable to a collection applying a predicate and a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(Iterator<T3> input,
Transformer<T1,T2> transformer,
IsCollectionStrategy<S,T2> strategy)
Converts the input
iterator to a collection applying a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(Iterator<T3> input,
Transformer<T1,T2> transformer,
Predicate<T3> predicate,
IsCollectionStrategy<S,T2> strategy)
Converts the input
iterator to a collection applying a predicate and a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(T3[] input,
Transformer<T1,T2> transformer,
IsCollectionStrategy<S,T2> strategy)
Converts the input
array to a collection applying a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> |
transform(T3[] input,
Transformer<T1,T2> transformer,
Predicate<T3> predicate,
IsCollectionStrategy<S,T2> strategy)
Converts the input
array to a collection applying a predicate and a transformation for each input element. |
default <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(Iterable<T3> input, Transformer<T1,T2> transformer, IsCollectionStrategy<S,T2> strategy)
Converts the input iterable to a collection applying a transformation for each input element.
T1 - the from/source of the transformer (also the type for iterable)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - iterable of input elementstransformer - a transformer to apply for each input element before copying to the outputstrategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nulldefault <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(Iterable<T3> input, Transformer<T1,T2> transformer, Predicate<T3> predicate, IsCollectionStrategy<S,T2> strategy)
Converts the input iterable to a collection applying a predicate and a transformation for each input element.
T1 - the from/source of the transformer (also the type for iterable)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - iterable of input elementstransformer - a transformer to apply for each input element before copying to the outputpredicate - a predicate to apply before transformation and copy of each input element (ignored if null)strategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nulldefault <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(Iterator<T3> input, Transformer<T1,T2> transformer, IsCollectionStrategy<S,T2> strategy)
Converts the input iterator to a collection applying a transformation for each input element.
T1 - the from/source of the transformer (also the type for the iterator)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - iterator of input elementstransformer - a transformer to apply for each input element before copying to the outputstrategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nulldefault <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(Iterator<T3> input, Transformer<T1,T2> transformer, Predicate<T3> predicate, IsCollectionStrategy<S,T2> strategy)
Converts the input iterator to a collection applying a predicate and a transformation for each input element.
T1 - the from/source of the transformer (also the type for the iterator)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - iterator of input elementstransformer - a transformer to apply for each input element before copying to the outputpredicate - a predicate to apply before transformation and copy of each input element (ignored if null)strategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nulldefault <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(T3[] input, Transformer<T1,T2> transformer, IsCollectionStrategy<S,T2> strategy)
Converts the input array to a collection applying a transformation for each input element.
T1 - the from/source of the transformer (also the type for the array)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - array of input elementstransformer - a transformer to apply for each input element before copying to the outputstrategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nulldefault <T1,T2,T3 extends T1,S extends Collection<T2>> S transform(T3[] input, Transformer<T1,T2> transformer, Predicate<T3> predicate, IsCollectionStrategy<S,T2> strategy)
Converts the input array to a collection applying a predicate and a transformation for each input element.
T1 - the from/source of the transformer (also the type for the array)T2 - the to/target of the transformer and the type of objects in the return collectionT3 - any type that extends T1 to no limit conversion to a single typeS - the type of collection that should be returnedinput - array of input elementstransformer - a transformer to apply for each input element before copying to the outputpredicate - a predicate to apply before transformation and copy of each input element (ignored if null)strategy - a strategy determining the type of output collectionNullPointerException - if input, transformer, or strategy was nullstatic ClusterElementTransformer create()
Creates a new transformer.
Copyright © 2016–2017. All rights reserved.