public class DictionaryTransformer extends Object implements Transformer
Dictionary
object to lookup a string in its
keys and returns the value if the key is found. Otherwise it returns the
original string.Modifier and Type | Field and Description |
---|---|
(package private) Dictionary |
dictionary |
Constructor and Description |
---|
DictionaryTransformer() |
Modifier and Type | Method and Description |
---|---|
Dictionary |
getDictionary() |
void |
setDictionary(Dictionary dictionary) |
String |
transform(String s)
Transform
s into another String. |
Dictionary dictionary
public DictionaryTransformer()
public String transform(String s) throws TransformationException
Transformer
s
into another String.transform
in interface Transformer
s
- The string to transformTransformationException
- If there is a problem with the transformer, e.g. unable to load external resource.public Dictionary getDictionary()
public void setDictionary(Dictionary dictionary)
Copyright © 2012–2014 Royal Botanic Gardens, Kew. All rights reserved.