public class TemplateReplacement
extends java.lang.Object
Client.requestEmailTemplate(String, Map, Locale, EmailFormat).
A replacement is identified by a key, and can either have a single or a list value.| Constructor and Description |
|---|
TemplateReplacement(java.lang.String key)
Constructor.
|
TemplateReplacement(java.lang.String key,
java.util.List<java.lang.String> listValue)
Constructor for list-valued replacements.
|
TemplateReplacement(java.lang.String key,
java.lang.String singleValue)
Constructor for single-valued replacements.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListValueEntry(java.lang.String listValueEntry)
Adds a new entry to the list of values, which will be created if needed.
|
boolean |
equals(java.lang.Object other)
Checks equality based on
getKey(). |
java.lang.String |
getKey()
Returns the key that identifies the replacement.
|
java.util.List<java.lang.String> |
getListValue()
Returns the list-valued replacement, if any.
|
java.lang.String |
getSingleValue()
Returns the single-valued replacement, if any.
|
int |
hashCode() |
void |
setListValue(java.util.List<java.lang.String> value)
Sets the replacement value as a list of
Strings. |
void |
setSingleValue(java.lang.String value)
Sets the replacement value as a single
String. |
public TemplateReplacement(java.lang.String key)
key - The key that identifies the replacement.public TemplateReplacement(java.lang.String key,
java.lang.String singleValue)
key - The key that identifies the replacement.singleValue - The replacement value as a single String.public TemplateReplacement(java.lang.String key,
java.util.List<java.lang.String> listValue)
key - The key that identifies the replacement.listValue - The replacement value as a list of Strings.public java.lang.String getKey()
public java.lang.String getSingleValue()
null.public void setSingleValue(java.lang.String value)
String.
It nulls out the getListValue(), so you can't have both.value - The value to set as the single value.public java.util.List<java.lang.String> getListValue()
null.public void setListValue(java.util.List<java.lang.String> value)
Strings.
It nulls out the getSingleValue(), so you can't have both.value - The value to set as list of Strings.public void addListValueEntry(java.lang.String listValueEntry)
getSingleValue().listValueEntry - The replacement value to add to the list.public boolean equals(java.lang.Object other)
getKey().equals in class java.lang.Objectother - The other instance. If it's not a TemplateReplacement, the result is always false.true, if the getKey() of this and the other TemplateReplacement are equals, false otherwise.Object.equals(Object)public int hashCode()
hashCode in class java.lang.Object