public static interface CompositeMap.MapMutator<K,V> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
V |
put(CompositeMap
Called when the CompositeMap.put() method is invoked.
|
void |
putAll(CompositeMap
Called when the CompositeMap.putAll() method is invoked.
|
void |
resolveCollision(CompositeMap
Called when adding a new Composited Map results in a key collision.
|
void resolveCollision(CompositeMap<K ,V> composite, Map <K ,V> existing, Map <K ,V> added, Collection <K> intersect)
composite - the CompositeMap with the collision
existing - the Map already in the composite which contains the offending key
added - the Map being added
intersect - the intersection of the keysets of the existing and added maps
V put(CompositeMap<K ,V> map, Map <K ,V>[] composited, K key, V value)
map - the CompositeMap which is being modified
composited - array of Maps in the CompositeMap being modified
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
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.
UnsupportedOperationException - if not defined
ClassCastException - if the class of the specified key or value prevents it from being stored in this map.
IllegalArgumentException - if some aspect of this key or value prevents it from being stored in this map.
NullPointerException - this map does not permit
null keys or values, and the specified key or value is
null.
void putAll(CompositeMap<K ,V> map, Map <K ,V>[] composited, Map <? extends K ,? extends V> mapToAdd)
map - the CompositeMap which is being modified
composited - array of Maps in the CompositeMap being modified
mapToAdd - Mappings to be stored in this CompositeMap
UnsupportedOperationException - if not defined
ClassCastException - if the class of the specified key or value prevents it from being stored in this map.
IllegalArgumentException - if some aspect of this key or value prevents it from being stored in this map.
NullPointerException - this map does not permit
null keys or values, and the specified key or value is
null.