|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.ksu.cis.calculator.Deque
A double-ended queue which grows as needed.
Constructor Summary | |
Deque()
|
Method Summary | |
void |
addToBack(Object o)
Inserts the given Object at the back of the Deque. |
void |
addToFront(Object o)
Inserts the given Object at the front of the Deque. |
Object |
getBack()
Returns the Object at the back of the Deque. |
Object |
getFront()
Returns the Object at the front of the Deque. |
int |
getSize()
Returns the number of elements in the Deque. |
boolean |
isEmpty()
Returns true iff the Deque is empty. |
Object |
removeFromBack()
Removes the Object at the back of the Deque and returns it. |
Object |
removeFromFront()
Removes the Object at the front of the Deque and returns it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Deque()
Method Detail |
public boolean isEmpty()
public int getSize()
public void addToBack(Object o)
public void addToFront(Object o)
public Object getFront() throws EmptyDequeException
EmptyDequeException
- If the Deque is empty.public Object getBack() throws EmptyDequeException
EmptyDequeException
- If the Deque is empty.public Object removeFromFront() throws EmptyDequeException
EmptyDequeException
- If the Deque is empty.public Object removeFromBack() throws EmptyDequeException
EmptyDequeException
- If the Deque is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |