com.phoenixst.collections

Class CollectionWrapper

public class CollectionWrapper extends AbstractCollection

A Collection which wraps another. This class is intended to be extended by overriding the CollectionWrapper and CollectionWrapper methods.

Since: 1.0

Version: $Revision: 1.9 $

Author: Ray A. Conner

Constructor Summary
CollectionWrapper(Collection delegate)
Creates a new CollectionWrapper.
protected CollectionWrapper()
This constructor, along with CollectionWrapper, allows a subclass to initialize the internal state during deserialization.
Method Summary
booleanadd(Object object)
booleanaddAll(Collection collection)
voidclear()
booleancontains(Object object)
booleancontainsAll(Collection collection)
protected CollectiongetDelegate()
Provides accesss to the internal state so it can be manually serialized by a subclass's writeObject() method.
protected voidinitialize(Collection collection)
This method should only be called by subclasses during deserialization.
booleanisEmpty()
Iteratoriterator()
booleanremove(Object object)
booleanremoveAll(Collection collection)
booleanretainAll(Collection collection)
intsize()
Object[]toArray()
Object[]toArray(Object[] array)
StringtoString()
protected ObjectunwrapObject(Object object)
Returns an unwrapped object.
protected ObjectwrapObject(Object object)
Returns a wrapped object.

Constructor Detail

CollectionWrapper

public CollectionWrapper(Collection delegate)
Creates a new CollectionWrapper.

CollectionWrapper

protected CollectionWrapper()
This constructor, along with CollectionWrapper, allows a subclass to initialize the internal state during deserialization.

Method Detail

add

public boolean add(Object object)

addAll

public boolean addAll(Collection collection)

clear

public void clear()

contains

public boolean contains(Object object)

containsAll

public boolean containsAll(Collection collection)

getDelegate

protected final Collection getDelegate()
Provides accesss to the internal state so it can be manually serialized by a subclass's writeObject() method.

initialize

protected final void initialize(Collection collection)
This method should only be called by subclasses during deserialization.

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()

remove

public boolean remove(Object object)

removeAll

public boolean removeAll(Collection collection)

retainAll

public boolean retainAll(Collection collection)

size

public int size()

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] array)

toString

public String toString()

unwrapObject

protected Object unwrapObject(Object object)
Returns an unwrapped object. This implementation returns the argument object.

wrapObject

protected Object wrapObject(Object object)
Returns a wrapped object. This implementation returns the argument object.
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.