|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.toronto.cs.simulator.XCTraceState
public class XCTraceState
XCTraceState is the class used to store the state info in the trace.
Constructor Summary | |
---|---|
XCTraceState()
Makes an empty trace state node with no parents or children. |
|
XCTraceState(XCTraceState par,
XCStateInfo si,
boolean ms)
Makes a trace tree node with the specified parent, children and state info. |
Method Summary | |
---|---|
void |
addChild(XCTraceState child)
Adds another next state. |
boolean |
equals(java.lang.Object o)
If the object compared to is of type XCTraceState and has equal state info, returns true; otherwise returs false. |
XCTraceState |
getChild(int index)
Retrieves the next state by its index. |
int |
getChildIndex(XCTraceState state)
Retrieves the specified next state's index. |
XCTraceState[] |
getChildren()
Gets all the next states that are available. |
XCStateInfo |
getInfo()
Retrieves the state info. |
int |
getNumChildren()
Tells the number of the next states available to be explored. |
XCTraceState |
getParent()
Gets the previous state from the trace. |
boolean |
isMultiState()
|
XCTraceState |
remove()
Removes the node (with the entire sub-tree) from it's parent. |
void |
setInfo(XCStateInfo newinfo,
boolean ms)
Sets the state info. |
void |
setParent(XCTraceState newparent)
Allows to specify the previous state in the trace. |
java.lang.String |
toString()
Creates a string containg the state name as specified in the state info (not the parent or children info). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XCTraceState()
public XCTraceState(XCTraceState par, XCStateInfo si, boolean ms)
par
- - parentsi
- - state info, if null an empty XCStateInfo will be
used instead.Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- - Object to compare.
public XCStateInfo getInfo()
public void setInfo(XCStateInfo newinfo, boolean ms)
newinfo
- - the new state info, if null an empty
XCStateInfo object will be used instead.public int getNumChildren()
public XCTraceState[] getChildren()
public XCTraceState getChild(int index)
index
- - index of the state to retrieve
public int getChildIndex(XCTraceState state)
state
- - state you want the index of
public void addChild(XCTraceState child)
child
- - new next state to be added.public XCTraceState remove()
public XCTraceState getParent()
public void setParent(XCTraceState newparent)
newparent
- - the previous state in the trace.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isMultiState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |