|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.hws.jcm.data.StackOfDouble
A standard stack of values of type double, which can grow to arbitrary size.
Constructor Summary | |
StackOfDouble()
Create an initially empty stack. |
|
StackOfDouble(int initialSize)
Create an empty stack that initially has space for initialSize items pre-allocated. |
Method Summary | |
boolean |
isEmpty()
Return true if and only if the stack contains no items. |
void |
makeEmpty()
Clear all items from the stack. |
double |
pop()
Remove and return the top item on the stack. |
void |
push(double x)
Add x to top of stack. |
int |
size()
Return the number of items on the stack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StackOfDouble()
public StackOfDouble(int initialSize)
Method Detail |
public void push(double x)
public double pop()
public boolean isEmpty()
public void makeEmpty()
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |