|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a queue of objects. It is an error for the queue to contain null. Concrete classes should include at least a zero-argument constructor which creates an empty queue.
Method Summary | |
java.lang.Object |
dequeue()
Remove an object from the queue. |
boolean |
enqueue(java.lang.Object newValue)
Push a new object on the queue. |
java.lang.Object |
front()
Look at the front of the queue. |
boolean |
isEmpty()
Tell whether the queue is empty. |
boolean |
isFull()
Tell whether the queue is full. |
int |
size()
Tells how many objects are currently in the queue. |
Method Detail |
public boolean enqueue(java.lang.Object newValue)
newValue
- a non-null object
java.lang.IllegalArgumentException
- if the new value is null.public java.lang.Object dequeue()
public java.lang.Object front()
public boolean isEmpty()
public boolean isFull()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |