public class CollectionWrapper extends AbstractCollection
Collection
which wraps another. This class is
intended to be extended by overriding the wrapObject(java.lang.Object)
and
unwrapObject(java.lang.Object)
methods.Modifier | Constructor and Description |
---|---|
protected |
CollectionWrapper()
This constructor, along with
initialize(java.util.Collection) , allows a
subclass to initialize the internal state during
deserialization. |
|
CollectionWrapper(Collection delegate)
Creates a new
CollectionWrapper . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object object) |
boolean |
addAll(Collection collection) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection collection) |
protected Collection |
getDelegate()
Provides accesss to the internal state so it can be manually
serialized by a subclass's
writeObject() method. |
protected void |
initialize(Collection collection)
This method should only be called by subclasses during
deserialization.
|
boolean |
isEmpty() |
Iterator |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection collection) |
boolean |
retainAll(Collection collection) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] array) |
String |
toString() |
protected Object |
unwrapObject(Object object)
Returns an unwrapped object.
|
protected Object |
wrapObject(Object object)
Returns a wrapped object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public CollectionWrapper(Collection delegate)
CollectionWrapper
.protected CollectionWrapper()
initialize(java.util.Collection)
, allows a
subclass to initialize the internal state during
deserialization.protected final void initialize(Collection collection)
protected final Collection getDelegate()
writeObject()
method.protected Object wrapObject(Object object)
protected Object unwrapObject(Object object)
public int size()
size
in interface Collection
size
in class AbstractCollection
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in class AbstractCollection
public void clear()
clear
in interface Collection
clear
in class AbstractCollection
public boolean add(Object object)
add
in interface Collection
add
in class AbstractCollection
public boolean remove(Object object)
remove
in interface Collection
remove
in class AbstractCollection
public boolean contains(Object object)
contains
in interface Collection
contains
in class AbstractCollection
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in class AbstractCollection
public boolean addAll(Collection collection)
addAll
in interface Collection
addAll
in class AbstractCollection
public boolean containsAll(Collection collection)
containsAll
in interface Collection
containsAll
in class AbstractCollection
public boolean removeAll(Collection collection)
removeAll
in interface Collection
removeAll
in class AbstractCollection
public boolean retainAll(Collection collection)
retainAll
in interface Collection
retainAll
in class AbstractCollection
public Object[] toArray()
toArray
in interface Collection
toArray
in class AbstractCollection
public Object[] toArray(Object[] array)
toArray
in interface Collection
toArray
in class AbstractCollection
public String toString()
toString
in class AbstractCollection
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.