org.jboss.remoting.util
Class SynchronizedCollection<V>

java.lang.Object
  extended by org.jboss.remoting.util.SynchronizedCollection<V>
All Implemented Interfaces:
Iterable<V>, Collection<V>
Direct Known Subclasses:
SynchronizedSet

public class SynchronizedCollection<V>
extends Object
implements Collection<V>


Constructor Summary
SynchronizedCollection(Collection<V> delegate)
           
SynchronizedCollection(Collection<V> delegate, Object monitor)
           
 
Method Summary
 boolean add(V o)
           
 boolean addAll(Collection<? extends V> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<V> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizedCollection

public SynchronizedCollection(Collection<V> delegate)

SynchronizedCollection

public SynchronizedCollection(Collection<V> delegate,
                              Object monitor)
Method Detail

size

public int size()
Specified by:
size in interface Collection<V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<V>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<V>

iterator

public Iterator<V> iterator()
Specified by:
iterator in interface Iterable<V>
Specified by:
iterator in interface Collection<V>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<V>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<V>

add

public boolean add(V o)
Specified by:
add in interface Collection<V>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<V>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<V>

addAll

public boolean addAll(Collection<? extends V> c)
Specified by:
addAll in interface Collection<V>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<V>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<V>

clear

public void clear()
Specified by:
clear in interface Collection<V>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<V>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 JBoss, a division of Red Hat, Inc.