org.apache.commons.collections.map
Interface CompositeMap.MapMutator
public static interface CompositeMap.MapMutator
This interface allows definition for all of the indeterminate
mutators in a CompositeMap, as well as providing a hook for
callbacks on key collisions.
Object | put(CompositeMap map, Map[] composited, Object key, Object value)- Called when the CompositeMap.put() method is invoked.
|
void | putAll(CompositeMap map, Map[] composited, Map mapToAdd)- Called when the CompositeMap.putAll() method is invoked.
|
void | resolveCollision(CompositeMap composite, Map existing, Map added, Collection intersect)- Called when adding a new Composited Map results in a
key collision.
|
put
public Object put(CompositeMap map,
Map[] composited,
Object key,
Object value) Called when the CompositeMap.put() method is invoked.
map - the CompositeMap which is being modifiedcomposited - array of Maps in the CompositeMap being modifiedkey - key with which the specified value is to be associated.value - value to be associated with the specified key.
- previous value associated with specified key, or null
if there was no mapping for key. A null return can
also indicate that the map previously associated null
with the specified key, if the implementation supports
null values.
putAll
public void putAll(CompositeMap map,
Map[] composited,
Map mapToAdd) Called when the CompositeMap.putAll() method is invoked.
map - the CompositeMap which is being modifiedcomposited - array of Maps in the CompositeMap being modifiedmapToAdd - Mappings to be stored in this CompositeMap
resolveCollision
public void resolveCollision(CompositeMap composite,
Map existing,
Map added,
Collection intersect) Called when adding a new Composited Map results in a
key collision.
composite - the CompositeMap with the collisionexisting - the Map already in the composite which contains the
offending keyadded - the Map being addedintersect - the intersection of the keysets of the existing and added maps
Copyright © 2001-2015 Apache Software Foundation. All Rights Reserved.