|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dataStructures.ArrayStack
Constructor Summary | |
ArrayStack()
create a stack with initial capacity 10 |
|
ArrayStack(int initialCapacity)
create a stack with the given initial capacity |
Method Summary | |
boolean |
empty()
|
static void |
main(java.lang.String[] args)
test program |
java.lang.Object |
peek()
|
java.lang.Object |
pop()
remove top element of stack and return it |
void |
push(java.lang.Object theElement)
add theElement to the top of the stack |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ArrayStack(int initialCapacity)
public ArrayStack()
Method Detail |
public boolean empty()
public java.lang.Object peek()
public void push(java.lang.Object theElement)
public java.lang.Object pop()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |