com.phoenixst.collections

Class SynchronizedCollection

public class SynchronizedCollection extends Object implements Collection, Serializable

A synchronized view of another Collection.

Since: 1.0

Version: $Revision: 1.5 $

Author: Ray A. Conner

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
booleanadd(Object object)
booleanaddAll(Collection collection)
voidclear()
booleancontains(Object object)
booleancontainsAll(Collection collection)
booleanisEmpty()
Iteratoriterator()
booleanremove(Object object)
booleanremoveAll(Collection collection)
booleanretainAll(Collection collection)
intsize()
Object[]toArray()
Object[]toArray(Object[] array)
StringtoString()

Constructor Detail

SynchronizedCollection

public SynchronizedCollection(Collection delegate)
Creates a synchronized view of the specified 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.

SynchronizedCollection

public SynchronizedCollection(Collection delegate, Object mutex)
Creates a synchronized view of the specified 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.

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)

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()
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.