|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Deque<E>
A Classs for basic operations of a double ended queue (DEQUE).
| Method Summary | |
|---|---|
boolean |
isEmpty()
|
boolean |
isFull()
|
E |
peekLeft()
Returns the element on the left end of the queue. |
E |
peekRight()
Returns the element on the right end of the queue. |
E |
popLeft()
Removes and returns the element on the left end of the queue. |
E |
popRight()
Removes and returns the element on the right end of the queue. |
void |
pushLeft(E element)
Adds an element to the left end of the queue. |
void |
pushRight(E element)
Adds an element to the right end of the queue. |
| Method Detail |
|---|
void pushLeft(E element)
throws Overflow
element - the element to be added
overflow - if the queue is full
Overflow
void pushRight(E element)
throws Overflow
element - the element to be added
overflow - if the queue is full
Overflow
E popLeft()
throws Underflow
Underflow - if the queue is empty
E popRight()
throws Underflow
Underflow - if the queue is empty
E peekRight()
throws Underflow
Underflow - if the queue is empty
E peekLeft()
throws Underflow
Underflow - if the queue is emptyboolean isEmpty()
boolean isFull()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||