|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmako5.util.ArrayStack<T>
public final class ArrayStack<T>
An array stack that may not be expanded.
| Constructor Summary | |
|---|---|
ArrayStack(int iCapacity_)
Makes a new stack with the given capacity. |
|
| Method Summary | |
|---|---|
int |
getCapacity()
Returns the maximum capacity for this stack. |
boolean |
isEmpty()
Returns true if this stack is empty. |
T |
pop()
Pops an element from this stack. |
void |
push(T rVal_)
Pushes an element into the stack. |
int |
size()
Returns the current number of elements in this stack. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayStack(int iCapacity_)
iCapacity_ - the desired capacity for the stack| Method Detail |
|---|
public void push(T rVal_)
push in interface Stack<T>rVal_ - the element to add into the stackpublic T pop()
pop in interface Stack<T>public boolean isEmpty()
isEmpty in interface Stack<T>public int size()
size in interface Stack<T>public int getCapacity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||