public class TransformerChain extends Object implements FunctionTransformer, Supplier, Consumer, Chain, Serializable
Transformer
sConstructor 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
ContinueProcessingException s 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
ContinueProcessingException s 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, wait
apply
public 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.Transformer
public 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()
Chain
List
of processors in the chaingetProcessors
in interface Chain
public boolean isCollectExceptions()
ContinueProcessingException
s and throw a WrapperException
with a LinkedHashMap
of the Transformer
that caused and the particular Exception
public void setCollectExceptions(boolean collectExceptions)
ContinueProcessingException
s and throw a WrapperException
with a LinkedHashMap
of the Transformer
that caused and the particular Exception
public boolean isChainOutput()
TransformerParallel
public void setChainOutput(boolean chainOutput)
TransformerParallel
public 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 maintainContext
public 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 maintainContext
Copyright © 2018. All rights reserved.