S1
- The type of the source elements being collectively transformedS2
- The type into which the source elements will be collectively transformedpublic class CollectionTransformer<S1,S2>
extends java.lang.Object
Constructor and Description |
---|
CollectionTransformer(Transformer<S1,S2> transformer)
Creates the CollectionTransformer
|
Modifier and Type | Method and Description |
---|---|
java.util.LinkedHashSet<S2> |
transformToLinkedHashSet(java.util.LinkedHashSet<S1> in)
Applies the transformer to the given collection of objects, returning a Set of correspondingly transformed objects that has maintained the iteration order of the input
|
java.util.LinkedList<S2> |
transformToList(java.util.Collection<? extends S1> in)
Applies the transformer to the given collection of objects, returning a List of correspondingly transformed objects
|
java.util.Set<S2> |
transformToSet(java.util.Collection<? extends S1> in)
Applies the transformer to the given collection of objects, returning a Set of correspondingly transformed objects
|
public CollectionTransformer(Transformer<S1,S2> transformer)
transformer
- The transformer to be applied to each individual element of the collectionpublic java.util.LinkedList<S2> transformToList(java.util.Collection<? extends S1> in)
in
- A Collection of objects to be transformedpublic java.util.Set<S2> transformToSet(java.util.Collection<? extends S1> in)
in
- A Collection of objects to be transformedpublic java.util.LinkedHashSet<S2> transformToLinkedHashSet(java.util.LinkedHashSet<S1> in)
in
- A Collection of objects to be transformed