com.phoenixst.collections
public class SynchronizedCollection extends Object implements Collection, Serializable
Collection
.
Since: 1.0
Version: $Revision: 1.5 $
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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() |
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.
Parameters: delegate the Collection
for which a
synchronized view is to be created.
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.
Parameters: delegate the Collection
for which a
synchronized view is to be created.