|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.utils.struct.BoundedQueue<T>
public class BoundedQueue<T>
This is a bounded queue. It only allows maxSize items.
| Constructor Summary | |
|---|---|
BoundedQueue(int maxSize)
Initialize the bounded queue. |
|
| Method Summary | |
|---|---|
void |
add(T object)
Adds an item to the end of the queue, which is the front of the list. |
boolean |
isEmpty()
Return true if the size is <= 0; |
int |
size()
Return the number of items in the queue. |
T |
take()
Takes the last of the underlying double linked list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BoundedQueue(int maxSize)
maxSize - | Method Detail |
|---|
public void add(T object)
object - public T take()
public int size()
public boolean isEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||