net.sf.molae.pipe.trafo
Class EntryTransformedMap<S,K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by net.sf.molae.pipe.basic.AbstractMapWithSet<K,V>
          extended by net.sf.molae.pipe.trafo.EntryTransformedMap<S,K,V>
All Implemented Interfaces:
Map<K,V>
Direct Known Subclasses:
InvertedMap, KeyTransformedMap, ValueTransformedMap

public class EntryTransformedMap<S,K,V>
extends AbstractMapWithSet<K,V>

A map that is created from a base collection and a transformer. The result of the transformation is the entry set of this map. As there are no restrictions to the kind of transformation, this map is read-only. Child maps may impose restrictions on the transformation and implement modifiable maps.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.molae.pipe.basic.AbstractMapWithSet
AbstractMapWithSet.EntrySet
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 void clear()
          Removes all mappings from the base map.
protected  Iterator<Map.Entry<K,V>> getEntrySetIterator()
          Returns the iterator of the entry set.
protected  TwoWayTransformer<S,Map.Entry<K,V>> getTransformer()
          Returns the underlying transformer.
 int size()
          Returns the size of the base map.
 
Methods inherited from class net.sf.molae.pipe.basic.AbstractMapWithSet
entrySet, keySet
 
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getTransformer

protected TwoWayTransformer<S,Map.Entry<K,V>> getTransformer()
Returns the underlying transformer.

Returns:
the underlying transformer

getEntrySetIterator

protected Iterator<Map.Entry<K,V>> getEntrySetIterator()
Description copied from class: AbstractMapWithSet
Returns the iterator of the entry set.

Specified by:
getEntrySetIterator in class AbstractMapWithSet<K,V>
Returns:
the iterator of the entry set.

size

public int size()
Returns the size of the base map.

Specified by:
size in interface Map<K,V>
Overrides:
size in class AbstractMapWithSet<K,V>
Returns:
the size of the base map.

clear

public void clear()
Removes all mappings from the base map.

Specified by:
clear in interface Map<K,V>
Overrides:
clear in class AbstractMap<K,V>
Throws:
UnsupportedOperationException - depending on the base map