|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Stack<E>
An abstract definition of a stack
| Method Summary | |
|---|---|
boolean |
isEmpty()
Method to check if the stack is empty |
E |
peek()
Method to return the top element on the stack, but not remove it from the stack |
E |
pop()
Method to remove the top element from the stack and return it |
void |
push(E element)
Method to add the element to the top of the stack |
int |
size()
Method to return the number of elements in the stack |
| Method Detail |
|---|
void push(E element)
element - the element to addE peek()
E pop()
int size()
boolean isEmpty()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||