public class SynchronizedCollection extends Object implements Collection, Serializable
Collection.| Constructor and Description |
|---|
SynchronizedCollection(Collection delegate)
Creates a synchronized view of the specified
Collection. |
SynchronizedCollection(Collection delegate,
Object mutex)
Creates a synchronized view of the specified
Collection and synchronized upon the specified
object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object object) |
boolean |
addAll(Collection collection) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection collection) |
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic SynchronizedCollection(Collection delegate)
Collection. It is the user's responsibility to
manually synchronize on the created Collection
when iterating over it. The created Collection
will be serializable if the specified delegate is
serializable.delegate - the Collection for which a
synchronized view is to be created.public SynchronizedCollection(Collection delegate, Object mutex)
Collection and synchronized upon the specified
object. It is the user's responsibility to manually
synchronize on the created Collection when
iterating over it. The created Collection will
be serializable if the specified delegate is
serializable.delegate - the Collection for which a
synchronized view is to be created.public int size()
size in interface Collectionpublic boolean isEmpty()
isEmpty in interface Collectionpublic void clear()
clear in interface Collectionpublic boolean add(Object object)
add in interface Collectionpublic boolean remove(Object object)
remove in interface Collectionpublic boolean contains(Object object)
contains in interface Collectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectionpublic boolean addAll(Collection collection)
addAll in interface Collectionpublic boolean containsAll(Collection collection)
containsAll in interface Collectionpublic boolean removeAll(Collection collection)
removeAll in interface Collectionpublic boolean retainAll(Collection collection)
retainAll in interface Collectionpublic Object[] toArray()
toArray in interface Collectionpublic Object[] toArray(Object[] array)
toArray in interface CollectionSee 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.