net.sf.molae.pipe.trafo
Class EntryTransformedMap<S,K,V>
java.lang.Object
java.util.AbstractMap<K,V>
net.sf.molae.pipe.basic.AbstractMapWithSet<K,V>
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 classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.util.AbstractMap |
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, toString, values |
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