|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpreditor.CMStack<E>
public class CMStack<E>
A simple stack. Holds generic objects. Specifically intended for the Preditor package within the Campus Model project.
| Field Summary | |
|---|---|
java.util.LinkedList<E> |
stack
|
| Constructor Summary | |
|---|---|
CMStack()
Constructs a new stack of type E. |
|
| Method Summary | |
|---|---|
boolean |
isEmpty()
Tests for emptiness of modelStack. |
E |
peek()
Peeks at top model in stack, without removing it. |
E |
pop()
Pops the model off the top of the stack. |
void |
print()
Prints the current stack. |
E |
push(E e)
Adds a new model to the top of the stack. |
int |
size()
Return the size of the stack. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.LinkedList<E> stack
| Constructor Detail |
|---|
public CMStack()
| Method Detail |
|---|
public E push(E e)
e - item to be added
public E pop()
public E peek()
public boolean isEmpty()
public int size()
public void print()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||