|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Term stack.
Method Summary | |
void |
clear()
Clear the content of this stack. |
boolean |
contains(Term term)
Return true if the stack contains the given Term. |
int |
getSize()
Returns the size of the stack. |
boolean |
isEmpty()
Returns true if the stack is empty. |
Term |
pop()
Returns the Term at the top and pops this stack. |
void |
push(Term term)
Push a Term at the top of this stack. |
void |
returnToFactory()
Returns this TermStack to the Factory. |
Term |
top()
Returns the Term at the top of this stack or null if it is empty. |
Method Detail |
public void returnToFactory()
Post-condition: is no more usable.
public int getSize()
public boolean isEmpty()
public void clear()
public boolean contains(Term term)
term
- a Term.
public void push(Term term)
term
- a Term to add on top of this stack.
java.lang.IllegalArgumentException
- if the given Term is null and this
stack doesn't accept null Terms.public Term pop()
java.lang.IllegalStateException
- if this stack is empty.public Term top()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |