|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.MapTransformer<I,O>
public final class MapTransformer<I,O>
Transformer implementation that returns the value held in a specified map using the input parameter as a key.
Method Summary | ||
---|---|---|
Map<? super I,? extends O> |
getMap()
Gets the map to lookup in. |
|
static
|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 cloned
public O transform(I input)
Map
.
transform
in interface Transformer<I,O>
input
- the input object to transform
public Map<? super I,? extends O> getMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |