public final class MapTransformer<I,O> extends java.lang.Object implements Transformer<I,O>, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
java.util.Map<? super I,? extends O> |
getMap()
Gets the map to lookup in.
|
static <I,O> Transformer<I,O> |
mapTransformer(java.util.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(java.util.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 © 2010 - 2020 Adobe. All Rights Reserved