|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.template.SimpleTextSubstitution
The class SimpleTextSubstitution
is a simple implementation
of TextSubstitution
that uses a HashMap to substitute named
string values.
Note it uses the toString() method rather than casting associated value objects to Strings and hence you can technically use objects other than Strings.
Constructor Summary | |
SimpleTextSubstitution()
SimpleTextSubstitution constructor that creates its own empty HashMap. |
|
SimpleTextSubstitution(java.util.HashMap newStringMap)
SimpleTextSubstitution constructor that takes a primed HashMap of string mappings. |
Method Summary | |
java.util.HashMap |
getStringMap()
Returns the underlying HashMap containing named string. |
java.lang.String |
getSubstitutionText(java.lang.String substitutionName)
This method is called to return a String that has been associated with the given substitution name. |
void |
put(java.lang.String substitutionName,
java.lang.Object substitutionValue)
This method associated the given substitution name with a string value. |
void |
setStringMap(java.util.HashMap newStringMap)
Sets the underlying HashMap of named String values. 99% of the time there is no need to call this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleTextSubstitution()
public SimpleTextSubstitution(java.util.HashMap newStringMap)
Method Detail |
public java.util.HashMap getStringMap()
public java.lang.String getSubstitutionText(java.lang.String substitutionName)
getSubstitutionText
in interface TextSubstitution
public void put(java.lang.String substitutionName, java.lang.Object substitutionValue)
public void setStringMap(java.util.HashMap newStringMap)
newStringMap
- java.util.HashMap
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |