|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface SimpleQueue<E>
Interface for queues. (This provides a common interface for potentially different implementations, but you could certainly write a stack class without it.)
| Method Summary | |
|---|---|
E |
dequeue()
Removes an element from the queue. |
boolean |
empty()
Tells whether queue is empty. |
void |
enqueue(E x)
Adds an element to the end of the queue. |
E |
front()
Gets the front element of the queue (but does not remove it). |
| Method Detail |
|---|
boolean empty()
void enqueue(E x)
throws QueueFullException
x - element to add
QueueFullException - if queue is already full
E dequeue()
throws QueueEmptyException
QueueEmptyException - if queue is empty
E front()
throws QueueEmptyException
QueueEmptyException - if queue is empty
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||