|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.Socket.FixedSizeQueue
A class that keeps a queue of objects, with a limited number of bytes to store them in.
| Field Summary | |
protected java.util.LinkedList |
queue
|
protected int |
size
|
protected int |
used
|
| Constructor Summary | |
Socket.FixedSizeQueue(int s)
Create a fixed size queue with the specified capacity (<=0 is infinite capacity). |
|
| Method Summary | |
boolean |
in(java.lang.Object data)
Add the specified object to the queue, returns if there is sufficient space. |
boolean |
isEmpty()
Returns if the queue is empty. |
java.lang.Object |
out()
Returns the next object from the queue and removes it, or null if the queue is empty. |
java.lang.Object |
peek()
Returns the first object in the queue (without removing it), or null if the queue is empty. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int size
protected int used
protected java.util.LinkedList queue
| Constructor Detail |
public Socket.FixedSizeQueue(int s)
| Method Detail |
public boolean in(java.lang.Object data)
public java.lang.Object out()
public java.lang.Object peek()
public boolean isEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||