public class Stack
extends java.lang.Object
Constructor | Description |
---|---|
Stack() |
Modifier and Type | Method | Description |
---|---|---|
double |
getNum(int idx) |
Get the value of something on the stack by index
|
int |
getStackSize() |
Get count of variables in the stack
|
double |
pop() |
Pop off the last entry from the stack.
|
void |
push(double num) |
Push a new entry into the stack.
|
void |
setNum(int idx,
double num) |
Set a particular value into the stack.
|
java.lang.String |
toString() |
Get list of values in the stack.
|
public double getNum(int idx)
idx
- public int getStackSize()
public java.lang.String toString()
toString
in class java.lang.Object
public double pop()
public void push(double num)
num
- public void setNum(int idx, double num)
idx
- num
-