| |
|
| java.lang.Object org.openjx.core.JXStack
All known Subclasses: org.openjx.core.JXObject,
JXStack | public class JXStack (Code) | | This class allows the JXObjects to be utilized as a stack.
author: Jared Spigner |
Field Summary | |
protected Stack<JXObject> | stack The stack is the actual stack device used to store JXObjects. |
Constructor Summary | |
public | JXStack() This is the constructor for the JXStack class. |
Method Summary | |
public JXObject | Pop() This method pops an object onto the stack. | public void | Push(JXObject obj) This method pushes an object onto the stack. | public JXObject | getElement(int idx) This method simply returns an element in the stack by an index number.
Parameters: idx - is the index number of the element we want returned. | public int | getLength() This method returns the length of the stack. |
stack | protected Stack<JXObject> stack(Code) | | The stack is the actual stack device used to store JXObjects.
|
JXStack | public JXStack()(Code) | | This is the constructor for the JXStack class. It creates a new
instance of JXStack.
|
Pop | public JXObject Pop()(Code) | | This method pops an object onto the stack.
the object we are popping off the stack. |
Push | public void Push(JXObject obj)(Code) | | This method pushes an object onto the stack.
Parameters: obj - is the object we want to push onto the stack. |
getElement | public JXObject getElement(int idx)(Code) | | This method simply returns an element in the stack by an index number.
Parameters: idx - is the index number of the element we want returned. the corresponding JXObject. |
getLength | public int getLength()(Code) | | This method returns the length of the stack.
the length of the stack. |
|
|
|