Plexus v0.13.1

com.phoenixst.collections
Class CompositeCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by com.phoenixst.collections.CompositeCollection
All Implemented Interfaces:
Serializable, Iterable, Collection

public class CompositeCollection
extends AbstractCollection
implements Serializable

A Collection view of a number of other Collections. New elements are added to the last Collection and elements are removed from the first Collection in which they are found.

Since:
1.0
Version:
$Revision: 1.11 $
Author:
Ray A. Conner
See Also:
Serialized Form

Constructor Summary
CompositeCollection(Collection collections)
          Creates a new CompositeCollection.
CompositeCollection(Collection[] collections)
          Creates a new CompositeCollection.
CompositeCollection(Collection first, Collection second)
          Creates a new CompositeCollection.
 
Method Summary
 boolean add(Object object)
           
 boolean addAll(Collection collection)
           
 void clear()
           
 boolean contains(Object object)
           
 List getOperands()
          Returns an unmodifiable List of the argument Collections being used by this CollectionChain.
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object object)
           
 boolean removeAll(Collection collection)
           
 boolean retainAll(Collection collection)
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
containsAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

CompositeCollection

public CompositeCollection(Collection[] collections)
Creates a new CompositeCollection.


CompositeCollection

public CompositeCollection(Collection collections)
Creates a new CompositeCollection.


CompositeCollection

public CompositeCollection(Collection first,
                           Collection second)
Creates a new CompositeCollection.

Method Detail

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Overrides:
isEmpty in class AbstractCollection

add

public boolean add(Object object)
Specified by:
add in interface Collection
Overrides:
add in class AbstractCollection

remove

public boolean remove(Object object)
Specified by:
remove in interface Collection
Overrides:
remove in class AbstractCollection

contains

public boolean contains(Object object)
Specified by:
contains in interface Collection
Overrides:
contains in class AbstractCollection

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in class AbstractCollection

addAll

public boolean addAll(Collection collection)
Specified by:
addAll in interface Collection
Overrides:
addAll in class AbstractCollection

removeAll

public boolean removeAll(Collection collection)
Specified by:
removeAll in interface Collection
Overrides:
removeAll in class AbstractCollection

retainAll

public boolean retainAll(Collection collection)
Specified by:
retainAll in interface Collection
Overrides:
retainAll in class AbstractCollection

clear

public void clear()
Specified by:
clear in interface Collection
Overrides:
clear in class AbstractCollection

getOperands

public List getOperands()
Returns an unmodifiable List of the argument Collections being used by this CollectionChain.


Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.