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:
Serializable, Cloneable, Iterable, Collection, Set

public class BlockingSet
extends HashSet

A HashSet that can wait until it is not empty.

Version:
$Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
Author:
The Apache Directory Project (dev@directory.apache.org)
See Also:
Serialized Form

Constructor Summary
BlockingSet()
           
 
Method Summary
 boolean add(Object o)
           
 Iterator iterator()
           
 boolean remove(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(Object o)
Specified by:
add in interface Collection
Specified by:
add in interface Set
Overrides:
add in class HashSet

iterator

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

remove

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

waitForNewItem

public void waitForNewItem()
                    throws InterruptedException
Throws:
InterruptedException


Copyright © 2004-2005 . All Rights Reserved.