## org.apache.commons.collections.collection
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
`boolean` `add(CompositeCollection composite, java.util.Collection[] collections, java.lang.Object obj)` Called when an object is to be added to the composite.
`boolean` `addAll(CompositeCollection composite, java.util.Collection[] collections, java.util.Collection coll)` Called when a collection is to be added to the composite.
`boolean` `remove(CompositeCollection composite, java.util.Collection[] collections, java.lang.Object obj)` Called when an object is to be removed to the composite.

Method Detail

### add

    boolean add(CompositeCollection composite,
                java.util.Collection[] collections,
                java.lang.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:
    `java.lang.UnsupportedOperationException` - if add is unsupported
    `java.lang.ClassCastException` - if the object cannot be added due to its type
    `java.lang.NullPointerException` - if the object cannot be added because its null
    `java.lang.IllegalArgumentException` - if the object cannot be added

### addAll

    boolean addAll(CompositeCollection composite,
                   java.util.Collection[] collections,
                   java.util.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:
    `java.lang.UnsupportedOperationException` - if add is unsupported
    `java.lang.ClassCastException` - if the object cannot be added due to its type
    `java.lang.NullPointerException` - if the object cannot be added because its null
    `java.lang.IllegalArgumentException` - if the object cannot be added

### remove

    boolean remove(CompositeCollection composite,
                   java.util.Collection[] collections,
                   java.lang.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:
    `java.lang.UnsupportedOperationException` - if removed is unsupported
    `java.lang.ClassCastException` - if the object cannot be removed due to its type
    `java.lang.NullPointerException` - if the object cannot be removed because its null
    `java.lang.IllegalArgumentException` - if the object cannot be removed

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.