|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Buffer is an ordered list of objects, that does not support querying or direct access to the elements. It is basically a First In/First Out (FIFO) buffer. It is useful in both pooling and queue implementation code among other things.
Method Summary | |
void |
add(java.lang.Object o)
Add an object into the buffer. |
boolean |
isEmpty()
Tests to see if the CircularBuffer is empty. |
java.lang.Object |
remove()
Removes the next object from the buffer. |
int |
size()
Returns the number of elements stored in the buffer. |
Method Detail |
public boolean isEmpty()
public int size()
public void add(java.lang.Object o)
BufferOverflowException
- if adding this element exceeds the
buffer's capacity.public java.lang.Object remove()
BufferUnderflowException
- if the buffer is already empty
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |