|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface CompositeMap.MapMutator<K,V>
This interface allows definition for all of the indeterminate mutators in a CompositeMap, as well as providing a hook for callbacks on key collisions.
| Method Summary | |
|---|---|
V |
put(CompositeMap<K,V> map,
Map[] composited,
K key,
V value)
Called when the CompositeMap.put() method is invoked. |
void |
putAll(CompositeMap<K,V> map,
Map[] composited,
Map<? extends K,? extends V> mapToAdd)
Called when the CompositeMap.putAll() method is invoked. |
void |
resolveCollision(CompositeMap<K,V> composite,
Map<? extends K,? extends V> existing,
Map<? extends K,? extends V> added,
Collection<K> intersect)
Called when adding a new Composited Map results in a key collision. |
| Method Detail |
|---|
void resolveCollision(CompositeMap<K,V> composite,
Map<? extends K,? extends V> existing,
Map<? extends K,? extends V> added,
Collection<K> intersect)
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
V put(CompositeMap<K,V> map,
Map[] composited,
K key,
V value)
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.
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[] composited,
Map<? extends K,? extends V> mapToAdd)
map - the CompositeMap which is being modifiedcomposited - array of Maps in the CompositeMap being modifiedmapToAdd - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||