public class StringConcatTransformer extends JoinTransformer<String>
filter, processors
Constructor and Description |
---|
StringConcatTransformer() |
StringConcatTransformer(List processors) |
Modifier and Type | Method and Description |
---|---|
protected String |
cleanDangligngDelimets(String result)
If a
JoinTransformer.filter is given then there maybe dangling delimiters in the end. |
Pattern |
getDanglingDelimRegEx()
Used by
cleanDangligngDelimets(String) to clean any dangling delimiters at the end of the join process |
String |
getDelimiter() |
protected String |
join(String result,
Object transformedInput)
Join results of type T
|
protected String |
joinDelimet(String result,
Object processor,
boolean hasNext)
In Join operations it maybe desired a delimeter is needed between joins of two
JoinTransformer.processors in sequence. |
void |
setDanglingDelimRegEx(Pattern danglingDelimRegEx)
Used by
cleanDangligngDelimets(String) to clean any dangling delimiters at the end of the join process |
void |
setDelimiter(String delimiter) |
getFilter, getProcessors, setFilter, setProcessors, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public StringConcatTransformer()
public StringConcatTransformer(List processors)
protected String joinDelimet(String result, Object processor, boolean hasNext)
JoinTransformer
JoinTransformer.processors
in sequence.joinDelimet
in class JoinTransformer<String>
result
- as T so far of all joinsprocessor
- as type T or Transformer
hasNext
- as boolean (if there are any more processors in the chain). If false the current processor is the last.
Note: If a JoinTransformer.filter
is defined; hasNext cannot factor the next in the chain will be part of result or not.
However, if there are any dangling delims left JoinTransformer.cleanDangligngDelimets(Object)
can be defined.protected String cleanDangligngDelimets(String result)
JoinTransformer
JoinTransformer.filter
is given then there maybe dangling delimiters in the end.
This method, defines how they can be cleared.cleanDangligngDelimets
in class JoinTransformer<String>
protected String join(String result, Object transformedInput) throws ContinueProcessingException
join
in class JoinTransformer<String>
result
- as JoinTransformer.processors
as a result of a previous JoinTransformer.join(Object, Object)
or input.transformedInput
- as Object of type T that maybe a literal from the JoinTransformer.processors
or as a result of transformation from a processor that acts on the main input
ContinueProcessingException
- if we want to ignore the call with the param and continue with the mail processing loop in JoinTransformer.transform(Object)
public String getDelimiter()
public void setDelimiter(String delimiter)
public Pattern getDanglingDelimRegEx()
cleanDangligngDelimets(String)
to clean any dangling delimiters at the end of the join processpublic void setDanglingDelimRegEx(Pattern danglingDelimRegEx)
cleanDangligngDelimets(String)
to clean any dangling delimiters at the end of the join processCopyright © 2018. All rights reserved.