Interface CompositeCollection.CollectionMutator
-
- All Known Subinterfaces:
CompositeSet.SetMutator
- Enclosing class:
- CompositeCollection
public static interface CompositeCollection.CollectionMutator
Pluggable strategy to handle changes to the composite.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(CompositeCollection composite, Collection[] collections, Object obj)
Called when an object is to be added to the composite.boolean
addAll(CompositeCollection composite, Collection[] collections, Collection coll)
Called when a collection is to be added to the composite.boolean
remove(CompositeCollection composite, Collection[] collections, Object obj)
Called when an object is to be removed to the composite.
-
-
-
Method Detail
-
add
boolean add(CompositeCollection composite, Collection[] collections, Object obj)
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
boolean addAll(CompositeCollection composite, Collection[] collections, Collection coll)
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
boolean remove(CompositeCollection composite, Collection[] collections, Object obj)
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
-
-