Interface CompositeCollection.CollectionMutator
- All Known Subinterfaces:
CompositeSet.SetMutator
- Enclosing class:
CompositeCollection
Deprecated.
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.
Pluggable strategy to handle changes to the composite.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(CompositeCollection composite, Collection[] collections, Object obj) Deprecated.Called when an object is to be added to the composite.booleanaddAll(CompositeCollection composite, Collection[] collections, Collection coll) Deprecated.Called when a collection is to be added to the composite.booleanremove(CompositeCollection composite, Collection[] collections, Object obj) Deprecated.Called when an object is to be removed to the composite.
-
Method Details
-
add
Deprecated.Called when an object is to be added to the composite.- Parameters:
composite- the CompositeCollection being changedcollections- all of the Collection instances in this CompositeCollectionobj- the object being added- Returns:
- true if the collection is changed
- Throws:
UnsupportedOperationException- if add is unsupportedClassCastException- if the object cannot be added due to its typeNullPointerException- if the object cannot be added because its nullIllegalArgumentException- if the object cannot be added
-
addAll
Deprecated.Called when a collection is to be added to the composite.- Parameters:
composite- the CompositeCollection being changedcollections- all of the Collection instances in this CompositeCollectioncoll- the collection being added- Returns:
- true if the collection is changed
- Throws:
UnsupportedOperationException- if add is unsupportedClassCastException- if the object cannot be added due to its typeNullPointerException- if the object cannot be added because its nullIllegalArgumentException- if the object cannot be added
-
remove
Deprecated.Called when an object is to be removed to the composite.- Parameters:
composite- the CompositeCollection being changedcollections- all of the Collection instances in this CompositeCollectionobj- the object being removed- Returns:
- true if the collection is changed
- Throws:
UnsupportedOperationException- if removed is unsupportedClassCastException- if the object cannot be removed due to its typeNullPointerException- if the object cannot be removed because its nullIllegalArgumentException- if the object cannot be removed
-