public abstract class AbstractTextTransformer extends Object implements Transformer<String>
Transformer
for strings.Constructor and Description |
---|
AbstractTextTransformer()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract List<TransformerRule> |
getRules()
This method gets the list of rules.
|
String |
transform(String string)
This method transforms a given
original value. |
protected abstract List<TransformerRule> getRules()
return
null
), that result is taken as singular form
and no further rule is invoked.public String transform(String string)
original
value. This value must NOT be modified by this method. To change
the original
value a new value has to be created and returned instead. If the value should NOT be changed,
the original
value (the exact same instance) should be returned.
This implementation processes the rules
in the order of occurrence. If a rule matches (does NOT
return
null
), that result is taken as result and no
further rule is invoked.transform
in interface Transformer<String>
string
- is the original value.null
if explicitly documented by the implementation. The
receiver of a Transformer
should also document if null
is a legal result.Copyright © 2001–2016 mmm-Team. All rights reserved.