public final class MapTransformer<I,O> extends Object implements Transformer<I,O>, Serializable
| Modifier and Type | Method and Description |
|---|---|
Map<? super I,? extends O> |
getMap()
Gets the map to lookup in.
|
static <I,O> Transformer<I,O> |
mapTransformer(Map<? super I,? extends O> map)
Factory to create the transformer.
|
O |
transform(I input)
Transforms the input to result by looking it up in a
Map. |
public static <I,O> Transformer<I,O> mapTransformer(Map<? super I,? extends O> map)
If the map is null, a transformer that always returns null is returned.
I - the input typeO - the output typemap - the map, not clonedpublic O transform(I input)
Map.transform in interface Transformer<I,O>input - the input object to transformCopyright © 2001–2013 The Apache Software Foundation. All rights reserved.