Interface CompositeCollection.CollectionMutator<E>
- 
- Type Parameters:
 E- the element being held in the collection
- All Superinterfaces:
 java.io.Serializable
- Enclosing class:
 - CompositeCollection<E>
 
public static interface CompositeCollection.CollectionMutator<E> extends java.io.SerializablePluggable strategy to handle changes to the composite. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, E obj)Called when an object is to be added to the composite.booleanaddAll(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, java.util.Collection<? extends E> coll)Called when a collection is to be added to the composite.booleanremove(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, java.lang.Object obj)Called when an object is to be removed to the composite. 
 - 
 
- 
- 
Method Detail
- 
add
boolean add(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, E 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:
 java.lang.UnsupportedOperationException- if add is unsupportedjava.lang.ClassCastException- if the object cannot be added due to its typejava.lang.NullPointerException- if the object cannot be added because its nulljava.lang.IllegalArgumentException- if the object cannot be added
 
- 
addAll
boolean addAll(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, java.util.Collection<? extends E> 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:
 java.lang.UnsupportedOperationException- if add is unsupportedjava.lang.ClassCastException- if the object cannot be added due to its typejava.lang.NullPointerException- if the object cannot be added because its nulljava.lang.IllegalArgumentException- if the object cannot be added
 
- 
remove
boolean remove(CompositeCollection<E> composite, java.util.List<java.util.Collection<E>> collections, java.lang.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:
 java.lang.UnsupportedOperationException- if removed is unsupportedjava.lang.ClassCastException- if the object cannot be removed due to its typejava.lang.NullPointerException- if the object cannot be removed because its nulljava.lang.IllegalArgumentException- if the object cannot be removed
 
 - 
 
 -