org.apache.commons.collections.set
Class CompositeSet
- Collection, Set
public class CompositeSet
implements Set
Decorates a set of other sets to provide a single unified view.
Changes made to this set will actually be made on the decorated set.
Add operations require the use of a pluggable strategy.
If no strategy is provided then add is unsupported.
$Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
CompositeSet()- Create an empty CompositeSet
|
CompositeSet(Set set)- Create a CompositeSet with just
set composited
|
CompositeSet(Set[] sets)- Create a composite set with sets as the initial set of composited Sets
|
void | addComposited(Collection c)- Add a Set to this composite
|
void | addComposited(Collection c, Collection d)- Add two sets to this composite
|
void | addComposited(Collection[] comps)- Add an array of sets to this composite
|
boolean | equals(Object obj)
|
int | hashCode()
|
boolean | remove(Object obj)- If a
CollectionMutator is defined for this CompositeSet then this
method will be called anyway.
|
void | setMutator(CompositeCollection.CollectionMutator mutator)- This can receive either a
CompositeCollection.CollectionMutator
or a CompositeSet.SetMutator.
|
add, addAll, addComposited, addComposited, addComposited, clear, contains, containsAll, getCollections, isEmpty, iterator, remove, removeAll, removeComposited, retainAll, setMutator, size, toArray, toArray, toCollection |
CompositeSet
public CompositeSet()
Create an empty CompositeSet
CompositeSet
public CompositeSet(Set set)
Create a CompositeSet with just set composited
set - The initial set in the composite
CompositeSet
public CompositeSet(Set[] sets)
Create a composite set with sets as the initial set of composited Sets
equals
public boolean equals(Object obj)
hashCode
public int hashCode()
remove
public boolean remove(Object obj)
If a CollectionMutator is defined for this CompositeSet then this
method will be called anyway.
- remove in interface CompositeCollection
obj - Object to be removed
- true if the object is removed, false otherwise
setMutator
public void setMutator(CompositeCollection.CollectionMutator mutator)
This can receive either a
CompositeCollection.CollectionMutator
or a
CompositeSet.SetMutator. If a
CompositeCollection.CollectionMutator is used than conflicts when adding
composited sets will throw IllegalArgumentException
- setMutator in interface CompositeCollection
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.