public class MapStringFunction extends java.lang.Object implements StringFunction
StringFunction
gets its transformed strings from a given map.IDENTITY_FUNCTION
Constructor and Description |
---|
MapStringFunction(java.util.Map map)
Creates a new MapStringFunction based on the given map.
|
MapStringFunction(java.util.Map map,
java.lang.String defaultString)
Creates a new MapStringFunction based on the given map, with a default string for strings that
are not in the map.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
transform(java.lang.String string)
Transforms the given string into a new string.
|
public MapStringFunction(java.util.Map map)
public MapStringFunction(java.util.Map map, java.lang.String defaultString)
public java.lang.String transform(java.lang.String string)
StringFunction
transform
in interface StringFunction