|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.colorado.collections.LinkedSeq
edu.colorado.collections.DerivedStack
public class DerivedStack
A DerivedStack is a LinkedSeq that can easily
be used as if it were a stack of Objects. The stack's objects are kept in
the sequence of the superclass, with the top of the stack at the head of
the sequence.
LinkedSeq,
ObjectStack,
ObjectLinkedStack| Constructor Summary | |
|---|---|
DerivedStack()
|
|
| Method Summary | |
|---|---|
boolean |
isEmpty()
Determine whether this stack is empty. |
java.lang.Object |
peek()
Get the top item of this stack, without removing the item. |
java.lang.Object |
pop()
Get the top item, removing it from this stack. |
void |
push(java.lang.Object element)
Push a new item onto this stack. |
| Methods inherited from class edu.colorado.collections.LinkedSeq |
|---|
addAfter, addAll, addBefore, advance, clone, concatentation, getCurrent, isCurrent, removeCurrent, size, start |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DerivedStack()
| Method Detail |
|---|
public boolean isEmpty()
- - none
true if this stack is empty;
false otherwise.public java.lang.Object peek()
- - none
java.util.EmptyStackException - Indicates that this stack is empty.public java.lang.Object pop()
- - none
java.util.EmptyStackException - Indicates that this stack is empty.public void push(java.lang.Object element)
item - the item to be pushed onto this stack
java.lang.OutOfMemoryError - Indicates insufficient memory for increasing the stack's capacity.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||