|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteece496.parsetree.ParseTree
Parse Tree class.
$Source: K:/cvsrepo/ee496/codes/jbuilder/src/TestCaseGenerator/src/eece496/parsetree/ParseTree.java,v $
Last updated by $Author: kcai $
$Date: 2003/08/04 06:41:52 $
$Revision: 1.15 $
$State: Exp $
Field Summary | |
static int |
AND
|
static int |
FALSE
|
static int |
NOT
|
static int |
OR
|
static int |
TEXT
|
static int |
TRUE
|
Constructor Summary | |
ParseTree()
Default constructor |
|
ParseTree(ParseTree p)
Constructor: Copy a ParseTree object to self |
|
ParseTree(java.lang.String kind,
int type,
ParseTree child1,
ParseTree child2,
java.lang.Double ROID,
java.lang.String text)
Constructor: Create a ParseTree with give parameters |
Method Summary | |
void |
clone(ParseTree p)
clone the contents from a Parse Tree node |
boolean |
equals(ParseTree p)
compare whether this Parse Tree equal the contents of the node specified |
ParseTree |
getChild(int i)
retrieve the node pointed by the child |
java.lang.String |
getKind()
retrieve the kind of the node |
java.lang.Double |
getRoid()
retrieve the Roid of the node |
java.lang.String |
getText()
retrieve the text of the node |
int |
getType()
retrieve the type of the node |
void |
print()
recursively print the Parse Tree (for debug purpose only) |
void |
setChild(int i,
ParseTree p)
set the value of child |
void |
setType(int i)
set the type of the node |
static ParseTree |
T_condition(int thisType,
java.lang.Object T1,
java.lang.Object T2,
java.lang.String T3)
construct a Condition node |
static ParseTree |
T_conditions(int thisType,
java.lang.String T1,
java.lang.Object T2,
java.lang.Object T3)
construct a Conditions node |
static ParseTree |
T_req(int thisType,
java.lang.Object T1,
java.lang.Object T2,
java.lang.Object T3,
java.lang.String T4)
construct a Requirement node |
static ParseTree |
T_reqs(java.lang.Object T1,
java.lang.Object T2)
construct a Requirements node |
static ParseTree |
T_stimOrResp(int thisType,
java.lang.Object T1)
construct a StimulusOrResponse node |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AND
public static final int OR
public static final int NOT
public static final int TEXT
public static final int TRUE
public static final int FALSE
Constructor Detail |
public ParseTree(ParseTree p)
p
- - a ParseTree objectpublic ParseTree(java.lang.String kind, int type, ParseTree child1, ParseTree child2, java.lang.Double ROID, java.lang.String text)
kind
- - kind of the nodetype
- - type of the specific kind of nodechild1
- - one child of the node which point to another nodechild2
- - the other child of the node which point to another nodeROID
- - Roid number of the nodetext
- - Text of the nodepublic ParseTree()
Method Detail |
public static ParseTree T_condition(int thisType, java.lang.Object T1, java.lang.Object T2, java.lang.String T3)
thisType
- - one type of ConditionT1
- - child oneT2
- - childe twoT3
- - text
public static ParseTree T_conditions(int thisType, java.lang.String T1, java.lang.Object T2, java.lang.Object T3)
thisType
- - one type of ConditionsT1
- - textT2
- - child oneT3
- - child two
public static ParseTree T_req(int thisType, java.lang.Object T1, java.lang.Object T2, java.lang.Object T3, java.lang.String T4)
thisType
- - one type of RequirementT1
- - child oneT2
- - child twoT3
- - RoidT4
- - text
public static ParseTree T_reqs(java.lang.Object T1, java.lang.Object T2)
T1
- - child oneT2
- - child two
public static ParseTree T_stimOrResp(int thisType, java.lang.Object T1)
thisType
- - one type of StimulusOrResponseT1
- - text
public void print()
public int getType()
public ParseTree getChild(int i)
i
- - one of the children
public void setType(int i)
i
- - typepublic void setChild(int i, ParseTree p)
i
- - index for the childp
- - the node which is pointed by the childpublic boolean equals(ParseTree p)
p
- - the node to be compared
public java.lang.String getKind()
public void clone(ParseTree p)
p
- the Parse Tree want to be clonedpublic java.lang.String getText()
public java.lang.Double getRoid()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |