public class CollectionTransformer extends Object implements FunctionTransformer, Serializable
Collection
, Array or Map
and apply a nested Transformer
to each element.
Collection
then it will be treated as a value and not be recursed.
TODO: Add unit test caseConstructor and Description |
---|
CollectionTransformer() |
CollectionTransformer(org.apache.commons.collections.Transformer transformer) |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.collections.Transformer |
getTransformer() |
boolean |
isCopy()
If true will make a copy of the original
Collection and modify that. |
boolean |
isIgnoreNulls()
If true, will ignore any null values in the collection type input.
|
void |
setCopy(boolean copy)
If true will make a copy of the original
Collection and modify that. |
void |
setIgnoreNulls(boolean ignoreNulls)
If true, will ignore any null values in the collection type input.
|
void |
setTransformer(org.apache.commons.collections.Transformer transformer) |
Object |
transform(Object input) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public CollectionTransformer()
public CollectionTransformer(org.apache.commons.collections.Transformer transformer)
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public org.apache.commons.collections.Transformer getTransformer()
public void setTransformer(org.apache.commons.collections.Transformer transformer)
public boolean isIgnoreNulls()
public void setIgnoreNulls(boolean ignoreNulls)
public boolean isCopy()
Collection
and modify that.public void setCopy(boolean copy)
Collection
and modify that.Copyright © 2018. All rights reserved.