⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.collection

Interface CompositeCollection.CollectionMutator

Enclosing Class:

All Known Direct Subinterfaces:
CompositeSet.SetMutator


public static interface CompositeCollection.CollectionMutator

Pluggable strategy to handle changes to the composite.

Method Summary

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 Details

add

public boolean add(CompositeCollection composite, Collection[] collections, Object obj)

Called when an object is to be added to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
obj - the object being added
Returns:
true if the collection is changed
Throws:
- if add is unsupported
- if the object cannot be added due to its type
- if the object cannot be added because its null
- if the object cannot be added

addAll

public boolean addAll(CompositeCollection composite, Collection[] collections, Collection coll)

Called when a collection is to be added to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
coll - the collection being added
Returns:
true if the collection is changed
Throws:
- if add is unsupported
- if the object cannot be added due to its type
- if the object cannot be added because its null
- if the object cannot be added

remove

public boolean remove(CompositeCollection composite, Collection[] collections, Object obj)

Called when an object is to be removed to the composite.

Parameters:
composite - the CompositeCollection being changed
collections - all of the Collection instances in this CompositeCollection
obj - the object being removed
Returns:
true if the collection is changed
Throws:
- if removed is unsupported
- if the object cannot be removed due to its type
- if the object cannot be removed because its null
- if the object cannot be removed