|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hawk.ds.Stack<T>
public class Stack<T>
Not to be confused with java's stack... Their's is a implemenation with fundamental mistake.
| Constructor Summary | |
|---|---|
Stack()
|
|
| Method Summary | ||
|---|---|---|
java.lang.String |
dump()
Returns the stack dump |
|
boolean |
isEmpty()
This deontes whether a stack is empty or not. |
|
|
pop()
This pops out the top object present in the stack. |
|
boolean |
push(T obj)
This pushes object to the stack. |
|
|
top()
This returns the top object present in the stack. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Stack()
| Method Detail |
|---|
public boolean push(T obj)
obj -
public <T> T pop()
public <T> T top()
public java.lang.String dump()
public boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||