public class BlockingSet
extends java.util.HashSet
HashSet
that can wait until it is not empty.Constructor and Description |
---|
BlockingSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object o) |
java.util.Iterator |
iterator() |
boolean |
remove(java.lang.Object o) |
void |
waitForNewItem() |
addAll, containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class java.util.HashSet
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in class java.util.HashSet
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in class java.util.HashSet
public void waitForNewItem() throws java.lang.InterruptedException
java.lang.InterruptedException