public class IterableToMapTransformer extends Object implements FunctionTransformer, Serializable
sequence
; where each element can be mapped to a name in a map due to predictability of its order index.
Iterable
and Array types. Any index beyond sequence will be mapped using unmappedNameTransformer
Constructor and Description |
---|
IterableToMapTransformer() |
IterableToMapTransformer(String[] sequence) |
Modifier and Type | Method and Description |
---|---|
String[] |
getSequence()
Sequence of names to map to the variables in the order of the index of the name
|
org.apache.commons.collections.Transformer |
getUnmappedNameTransformer()
Any index not in sequence; the index will be passed to this and the output will be the variable name.
If this is null; then the index itself will become the key as Integer.
|
void |
setSequence(String[] sequence)
Sequence of names to map to the variables in the order of the index of the name
|
void |
setUnmappedNameTransformer(org.apache.commons.collections.Transformer unmappedNameTransformer)
Any index not in sequence; the index will be passed to this and the output will be the variable name.
If this is null; then the index itself will become the key as Integer.
|
Object |
transform(Object input) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public IterableToMapTransformer()
public IterableToMapTransformer(String[] sequence)
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public String[] getSequence()
public void setSequence(String[] sequence)
public org.apache.commons.collections.Transformer getUnmappedNameTransformer()
public void setUnmappedNameTransformer(org.apache.commons.collections.Transformer unmappedNameTransformer)
Copyright © 2018. All rights reserved.