com.purpletech.util
Class BlockingQueue
java.lang.Object
|
+--com.purpletech.util.BlockingQueue
- All Implemented Interfaces:
- Queue
- public class BlockingQueue
- extends java.lang.Object
- implements Queue
|
Field Summary |
protected java.util.List |
list
|
protected int |
max
|
|
Method Summary |
void |
add(java.lang.Object obj)
If there is a maximum, then new items force old items out. |
java.lang.Object |
clone()
|
boolean |
isEmpty()
|
java.lang.Object |
remove()
|
void |
setBlockOnFull(boolean f)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
max
protected int max
list
protected java.util.List list
BlockingQueue
public BlockingQueue(int max)
BlockingQueue
public BlockingQueue()
BlockingQueue
protected BlockingQueue(BlockingQueue q)
setBlockOnFull
public void setBlockOnFull(boolean f)
add
public void add(java.lang.Object obj)
- If there is a maximum, then new items force old items out.
- Specified by:
add in interface Queue
remove
public java.lang.Object remove()
- Specified by:
remove in interface Queue
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Queue
size
public int size()
- Specified by:
size in interface Queue
clone
public java.lang.Object clone()
- Overrides:
clone in class java.lang.Object