|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenlist.Stack<Type>
public class Stack<Type>
A Stack is a last-in, first-out repository.
| Field Summary | |
|---|---|
private OpenList<Type> |
stack
|
| Constructor Summary | |
|---|---|
Stack()
Create an empty Stack. |
|
| Method Summary | |
|---|---|
boolean |
isEmpty()
Indicate whether or not the stack is empty |
boolean |
nonEmpty()
Indicate whether or not the stack is non-empty |
Type |
pop()
Pop an item from the Stack. |
void |
push(Type item)
Push one item to the Stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private OpenList<Type> stack
| Constructor Detail |
|---|
public Stack()
| Method Detail |
|---|
public void push(Type item)
item - the item to be pushedpublic Type pop()
public boolean isEmpty()
public boolean nonEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||