public class TransformerChain extends Object implements FunctionTransformer, Supplier, Consumer, Chain, Serializable
Transformers| Constructor and Description |
|---|
TransformerChain() |
TransformerChain(List<org.apache.commons.collections.Transformer> transformers) |
TransformerChain(org.apache.commons.collections.Transformer transformer) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Object t) |
Object |
chain(Object t) |
Object |
get() |
List<? extends org.apache.commons.collections.Transformer> |
getProcessors()
Gets the
List of processors in the chain |
List<org.apache.commons.collections.Transformer> |
getTransformers() |
boolean |
isChainOutput()
If true, the output from previous transformation becomes input for the next.
|
boolean |
isCollectExceptions()
If true will collect
ContinueProcessingExceptions and throw a WrapperException with a LinkedHashMap of the Transformer that caused and the particular Exception |
boolean |
isMaintainContext()
If true, will create a Context as a List of outputs generated by each transformer per mutually exclusive chain, including the original input as the first (0th index), element.
So for chainOutput true, the context list will contain the first input and then every subsequent output produced in the chain. |
void |
setChainOutput(boolean chainOutput)
If true, the output from previous transformation becomes input for the next.
|
void |
setCollectExceptions(boolean collectExceptions)
If true will collect
ContinueProcessingExceptions and throw a WrapperException with a LinkedHashMap of the Transformer that caused and the particular Exception |
void |
setMaintainContext(boolean maintainContext)
If true, will create a Context as a List of outputs generated by each transformer per mutually exclusive chain, including the original input as the first (0th index), element.
So for chainOutput true, the context list will contain the first input and then every subsequent output produced in the chain. |
void |
setTransformers(List<org.apache.commons.collections.Transformer> transformers) |
Object |
transform(Object in) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic TransformerChain()
public TransformerChain(List<org.apache.commons.collections.Transformer> transformers)
public TransformerChain(org.apache.commons.collections.Transformer transformer)
public Object transform(Object in)
transform in interface org.apache.commons.collections.Transformerpublic List<org.apache.commons.collections.Transformer> getTransformers()
public void setTransformers(List<org.apache.commons.collections.Transformer> transformers)
public List<? extends org.apache.commons.collections.Transformer> getProcessors()
ChainList of processors in the chaingetProcessors in interface Chainpublic boolean isCollectExceptions()
ContinueProcessingExceptions and throw a WrapperException with a LinkedHashMap of the Transformer that caused and the particular Exceptionpublic void setCollectExceptions(boolean collectExceptions)
ContinueProcessingExceptions and throw a WrapperException with a LinkedHashMap of the Transformer that caused and the particular Exceptionpublic boolean isChainOutput()
TransformerParallelpublic void setChainOutput(boolean chainOutput)
TransformerParallelpublic boolean isMaintainContext()
chainOutput true, the context list will contain the first input and then every subsequent output produced in the chain.
A Transformer that ContextAware will be passed the context not the output of the previous step then.
Similarly if chainOutput is false, then logically the context can only be the original input (which is no different) from passing it directly. So it will ignore maintainContextpublic void setMaintainContext(boolean maintainContext)
chainOutput true, the context list will contain the first input and then every subsequent output produced in the chain.
A Transformer that ContextAware will be passed the context not the output of the previous step then.
Similarly if chainOutput is false, then logically the context can only be the original input (which is no different) from passing it directly. So it will ignore maintainContextCopyright © 2018. All rights reserved.