Interface CompositeMap.MapMutator
-
- Enclosing class:
- CompositeMap
@Deprecated(since="2021-04-30") public static interface CompositeMap.MapMutatorDeprecated.Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectput(CompositeMap map, java.util.Map[] composited, java.lang.Object key, java.lang.Object value)Deprecated.Called when the CompositeMap.put() method is invoked.voidputAll(CompositeMap map, java.util.Map[] composited, java.util.Map mapToAdd)Deprecated.Called when the CompositeMap.putAll() method is invoked.voidresolveCollision(CompositeMap composite, java.util.Map existing, java.util.Map added, java.util.Collection intersect)Deprecated.Called when adding a new Composited Map results in a key collision.
-
-
-
Method Detail
-
resolveCollision
void resolveCollision(CompositeMap composite, java.util.Map existing, java.util.Map added, java.util.Collection intersect)
Deprecated.Called when adding a new Composited Map results in a key collision.- Parameters:
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
-
put
java.lang.Object put(CompositeMap map, java.util.Map[] composited, java.lang.Object key, java.lang.Object value)
Deprecated.Called when the CompositeMap.put() method is invoked.- Parameters:
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.- Returns:
- 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.
- Throws:
java.lang.UnsupportedOperationException- if not definedjava.lang.ClassCastException- if the class of the specified key or value prevents it from being stored in this map.java.lang.IllegalArgumentException- if some aspect of this key or value prevents it from being stored in this map.java.lang.NullPointerException- this map does not permit null keys or values, and the specified key or value is null.
-
putAll
void putAll(CompositeMap map, java.util.Map[] composited, java.util.Map mapToAdd)
Deprecated.Called when the CompositeMap.putAll() method is invoked.- Parameters:
map- the CompositeMap which is being modifiedcomposited- array of Maps in the CompositeMap being modifiedmapToAdd- Mappings to be stored in this CompositeMap- Throws:
java.lang.UnsupportedOperationException- if not definedjava.lang.ClassCastException- if the class of the specified key or value prevents it from being stored in this map.java.lang.IllegalArgumentException- if some aspect of this key or value prevents it from being stored in this map.java.lang.NullPointerException- this map does not permit null keys or values, and the specified key or value is null.
-
-