com.infomancers.collections.util
Class MapTransformation<T,K>

java.lang.Object
  extended by com.infomancers.collections.util.MapTransformation<T,K>
All Implemented Interfaces:
Transformation<T,K>

public final class MapTransformation<T,K>
extends java.lang.Object
implements Transformation<T,K>

Used for simple transformations based on key-value pairs located in a standard Map.

See Also:
Map

Constructor Summary
MapTransformation(java.util.Map<T,K> map)
           
 
Method Summary
 K transform(T item)
          Transforms item of type T to item of type K.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapTransformation

public MapTransformation(java.util.Map<T,K> map)
Method Detail

transform

public K transform(T item)
Transforms item of type T to item of type K.

Specified by:
transform in interface Transformation<T,K>
Parameters:
item - The item to transform.
Returns:
The transformed item.