|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
I
- The type of the input elements.O
- The type of the output elements.public interface Mapper<I,O>
A translation in the mapping process.
Classes implementing this interface provide the translation for one element from its original (input) type
to the target (output) type. See the map
family of functions in Collections
.
A mapper has no state. That is, the result of the map(Object)
translation is based solely
on the element passed, not on when it is translated. In other words, the outcome does not depend, for example,
on it's position in the input list, and the result must be consistently the same for multiple invocations,
provided no relevant information in the element is modified.
Nested Class Summary | |
---|---|
static class |
Mapper.IdentityMapper<E>
A Mapper that maps according to an identity function. |
Method Summary | |
---|---|
O |
map(I element)
Maps the element under translation from its original (input) type to the target (output) type of the mapping process. |
Method Detail |
---|
O map(I element)
element
- The element to be translated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |