public final class MapTransformer extends Object implements Transformer, Serializable
Modifier and Type | Method and Description |
---|---|
static Transformer |
getInstance(Map map)
Factory to create the transformer.
|
Map |
getMap()
Gets the map to lookup in.
|
Object |
transform(Object input)
Transforms the input to result by looking it up in a
Map . |
public static Transformer getInstance(Map map)
If the map is null, a transformer that always returns null is returned.
map
- the map, not clonedpublic Object transform(Object input)
Map
.transform
in interface Transformer
input
- the input object to transformpublic Map getMap()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.