public class SimpleTextTemplateApplier extends Object implements TextTemplateApplier
TextTemplateApplier
backed by a HashMap
and
an empty TextTemplate
by default.Modifier and Type | Field and Description |
---|---|
protected Map<String,TextElement> |
params |
protected TextTemplate |
template |
Constructor and Description |
---|
SimpleTextTemplateApplier()
Creates a new
SimpleTextTemplateApplier with an empty
TextTemplate . |
SimpleTextTemplateApplier(TextTemplate template)
Creates a new
SimpleTextTemplateApplier with the provided
TextTemplate . |
Modifier and Type | Method and Description |
---|---|
ImmutableMap<String,TextElement> |
getParameters()
Returns an
ImmutableList of this applier's parameters. |
TextTemplate |
getTemplate()
Returns the current
TextTemplate for this applier. |
void |
setParameter(String key,
TextElement value)
Sets the value of the specified parameter key within this applier.
|
void |
setTemplate(TextTemplate template)
Sets the
TextTemplate to use for this applier. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameter, toText
applyTo
protected final Map<String,TextElement> params
protected TextTemplate template
public SimpleTextTemplateApplier(TextTemplate template)
SimpleTextTemplateApplier
with the provided
TextTemplate
.template
- The template to usepublic SimpleTextTemplateApplier()
SimpleTextTemplateApplier
with an empty
TextTemplate
.public ImmutableMap<String,TextElement> getParameters()
TextTemplateApplier
ImmutableList
of this applier's parameters.getParameters
in interface TextTemplateApplier
public void setParameter(String key, TextElement value)
TextTemplateApplier
setParameter
in interface TextTemplateApplier
key
- Parameter keyvalue
- Parameter valuepublic TextTemplate getTemplate()
TextTemplateApplier
TextTemplate
for this applier.getTemplate
in interface TextTemplateApplier
public void setTemplate(TextTemplate template)
TextTemplateApplier
TextTemplate
to use for this applier.setTemplate
in interface TextTemplateApplier
template
- TextTemplate to use