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, waitgetParameter, toTextapplyToprotected 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()
TextTemplateApplierImmutableList of this applier's parameters.getParameters in interface TextTemplateApplierpublic void setParameter(String key, TextElement value)
TextTemplateAppliersetParameter in interface TextTemplateApplierkey - Parameter keyvalue - Parameter valuepublic TextTemplate getTemplate()
TextTemplateApplierTextTemplate for this applier.getTemplate in interface TextTemplateApplierpublic void setTemplate(TextTemplate template)
TextTemplateApplierTextTemplate to use for this applier.setTemplate in interface TextTemplateAppliertemplate - TextTemplate to use