org.apache.mina.util
Class BlockingSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet
              extended by org.apache.mina.util.BlockingSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Set

public class BlockingSet
extends java.util.HashSet

A HashSet that can wait until it is not empty.

Version:
$Rev: 326586 $, $Date: 2005-10-19 17:50:29 +0200 (Wed, 19 Oct 2005) $
Author:
The Apache Directory Project (dev@directory.apache.org)
See Also:
Serialized Form

Constructor Summary
BlockingSet()
           
 
Method Summary
 boolean add(java.lang.Object o)
           
 java.util.Iterator iterator()
           
 boolean remove(java.lang.Object o)
           
 void waitForNewItem()
           
 
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

BlockingSet

public BlockingSet()
Method Detail

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.Set
Overrides:
add in class java.util.HashSet

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.Set
Overrides:
iterator in class java.util.HashSet

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.Set
Overrides:
remove in class java.util.HashSet

waitForNewItem

public void waitForNewItem()
                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException