public class SmartSingleValuesTransformer extends Object implements FunctionTransformer
Collections
as values in a Data-Structure (most preferbly a Map
).
For processing purposes its a necessary step to often extract the single value from the default List as the actual value.
Collection
or Map
; and return a new instance. To attempt to modify input instance use modifyInstance
= true
If the input is an unmodifiable Collection
it may result in an Exception or an ArrayList
being created as a return object.Constructor and Description |
---|
SmartSingleValuesTransformer() |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getParamsAsCollections()
|
boolean |
isModifyInstance()
If true, attempt modification of the input Object
|
protected Object |
processElement(Object key,
Object o) |
void |
setModifyInstance(boolean modifyInstance)
If true, attempt modification of the input Object
|
void |
setParamsAsCollections(Set<String> paramsAsCollections)
|
Object |
transform(Object input) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public boolean isModifyInstance()
public void setModifyInstance(boolean modifyInstance)
Copyright © 2018. All rights reserved.