|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.apache.commons.collections.map.AbstractMapDecorator
|
+--org.apache.commons.collections.map.AbstractInputCheckedMapDecorator
|
+--org.apache.commons.collections.map.TransformedMap
Decorates another Map to transform objects that are added.
The Map put methods and Map.Entry setValue method are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects.
This class is Serializable from Commons Collections 3.1.
| Method Summary | |
static java.util.Map |
decorate(java.util.Map map,
Transformer keyTransformer,
Transformer valueTransformer)
Factory method to create a transforming map. |
java.util.Set |
entrySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map mapToCopy)
|
| Methods inherited from class org.apache.commons.collections.map.AbstractMapDecorator |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static java.util.Map decorate(java.util.Map map,
Transformer keyTransformer,
Transformer valueTransformer)
If there are any elements already in the map being decorated, they are NOT transformed.
map - the map to decorate, must not be nullkeyTransformer - the transformer to use for key conversion, null means no conversionvalueTransformer - the transformer to use for value conversion, null means no conversion
java.lang.IllegalArgumentException - if map is null
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapput in class AbstractMapDecoratorpublic void putAll(java.util.Map mapToCopy)
putAll in interface java.util.MapputAll in class AbstractMapDecoratorpublic java.util.Set entrySet()
entrySet in interface java.util.MapentrySet in class AbstractMapDecorator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||