public class KeywordString
extends java.lang.Object
Constructor and Description |
---|
KeywordString(java.lang.String template)
Constructs a new
KeywordString for the given template. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String[] |
getKeywords()
Returns all the unique keywords in the underlying string.
|
int |
hashCode() |
java.lang.String |
replaceKeywords(java.util.Map<java.lang.String,java.lang.String> replacements)
Replaces keywords with the given replacements and
return the resulting string.
|
java.lang.String |
toString() |
public KeywordString(java.lang.String template)
KeywordString
for the given template.template
- a string with embedded keywords.public java.lang.String[] getKeywords()
public java.lang.String replaceKeywords(java.util.Map<java.lang.String,java.lang.String> replacements)
replacements
- map of keyword names (no leading %) to their replacement values.
Extra replacements (no matching keyword) are ignored.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
© Copyright IBM Corporation 2000, 2009
US Government Users Restricted Rights--Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Notices