public class MapFilter extends java.lang.Object implements Filter
MapFilter object is a filter that can make use
of user specified mappings for replacement. This filter can be
given a Map of name value pairs which will be used
to resolve a value using the specified mappings. If there is
no match found the filter will delegate to the provided filter.| Constructor and Description |
|---|
MapFilter(java.util.Map map)
Constructor for the
MapFilter object. |
MapFilter(java.util.Map map,
Filter filter)
Constructor for the
MapFilter object. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
replace(java.lang.String text)
Replaces the text provided with the value resolved from the
specified
Map. |
public MapFilter(java.util.Map map)
MapFilter object. This will
use the specified mappings to resolve replacements. If this
map does not contain a requested mapping null is resolved.map - this contains the user specified mappingspublic MapFilter(java.util.Map map,
Filter filter)
MapFilter object. This will
use the specified mappings to resolve replacements. If this
map does not contain a requested mapping the provided filter
is used to resolve the replacement text.map - this contains the user specified mappingsfilter - this is delegated to if the map fails