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