public class StackOfDouble extends Object implements Serializable
Constructor and Description |
---|
StackOfDouble()
Create an initially empty stack.
|
StackOfDouble(int initialSize)
Create an empty stack that initially has space for initialSize items pre-allocated.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public StackOfDouble()
public StackOfDouble(int initialSize)
public void push(double x)
public double pop()
public boolean isEmpty()
public void makeEmpty()
public int size()