|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.bbk.dcs.automed.qproc.Cell
Every node in an ASG is a Cell, so one has to use this class in order to perform any operations on an ASG
| Field Summary | |
static int |
apply
|
static int |
constant
|
static int |
constructor
|
static int |
function
|
static int |
lambda
|
static int |
scheme
|
static int |
special
|
static int |
sysvariable
|
static int |
variable
|
| Constructor Summary | |
Cell(int snum,
java.lang.Object sdata)
|
|
Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef)
|
|
Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef,
java.lang.Object sdata)
|
|
Cell(java.lang.Object lRef,
java.lang.Object rRef)
|
|
Cell(java.lang.String sdata)
|
|
| Method Summary | |
Cell |
copyOfGraph()
Returns an exact copy of the ASG |
java.lang.Object |
data()
Returns the Object contained in the Cell |
double |
getDouble()
Returns the value of the double contained in the Cell |
boolean |
isApply()
Returns true if tag is apply |
boolean |
isConsConstructor()
Returns true if tag is "Cons" |
boolean |
isConstant()
Returns true if tag is constant |
boolean |
isConstructor()
Returns true if tag is constructor |
boolean |
isFunction()
Returns true if tag is function |
boolean |
isLambda()
Returns true if tag is lambda |
boolean |
isNilConstructor()
Returns true if tag is "Nil" |
boolean |
isNum()
Returns true if the Cell contains a double |
boolean |
isScheme()
Returns true if tag is scheme |
boolean |
isSpecial()
Returns true if tag is special |
boolean |
isSysVariable()
Returns true if tag is sysvariable |
boolean |
isVariable()
Returns true if tag is variable |
Cell |
l()
Returns a reference to the left child of the Cell |
void |
mimicThisCell(Cell n)
Returns an exact copy of the input Cell |
boolean |
newScope()
|
Cell |
r()
Returns a reference to the right child of the Cell |
boolean |
representsComprehension()
Returns true if the Cell is the root of an ASG representing a comprehension |
boolean |
representsGenerator()
Returns true if the Cell is the root of an ASG representing a generator |
boolean |
representsList()
Returns true if the Cell is the root of an ASG representing a list |
boolean |
representsPair()
Returns true if tag is "Tuple2" |
boolean |
representsSingleton()
|
boolean |
representsTuple()
Returns true if the Cell is the root of an ASG representing a Tuple |
void |
set_l(Cell n)
Sets the reference to the left child of the Cell to n |
void |
set_r(Cell n)
Sets the reference to the left child of the Cell to n |
void |
setData(java.lang.Object newData)
Sets the Cell's data |
void |
setNewScope()
|
Cell |
singleton()
Returns the root of an ASG representing an empty list |
int |
tag()
Returns the Cell's tag |
java.lang.String |
text()
Returns the string representation of the object contained in the Cell |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int apply
public static int lambda
public static int constant
public static int scheme
public static int constructor
public static int variable
public static int function
public static int special
public static int sysvariable
| Constructor Detail |
public Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef,
java.lang.Object sdata)
snum - designates the type of the Cell. Possible values:
apply, lambda, constant, identifier, scheme,
constructor, variable, function, special, sysvariablelRef - reference to the Cell's left childrRef - reference to the Cell's right childsdata - Object container, whose value depends on snum. Possible values:
apply:null, lambda:lambda, constant:(integer, String, ...),
scheme:(String), constructor:(String, for example Cons, Tuple2, ...),
variable:(String, e.g. x, y, ...), function:(function name),
special:Let, sysvariable:(wrapper object)
public Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef)
public Cell(int snum,
java.lang.Object sdata)
public Cell(java.lang.Object lRef,
java.lang.Object rRef)
public Cell(java.lang.String sdata)
| Method Detail |
public java.lang.String text()
public java.lang.Object data()
public boolean isNum()
public double getDouble()
public int tag()
public Cell l()
public Cell r()
public void set_l(Cell n)
public void set_r(Cell n)
public void setData(java.lang.Object newData)
public void mimicThisCell(Cell n)
public Cell copyOfGraph()
public Cell singleton()
public boolean isApply()
public boolean isLambda()
public boolean isConstant()
public boolean isScheme()
public boolean isConstructor()
public boolean isVariable()
public boolean isSpecial()
public boolean isFunction()
public boolean isSysVariable()
public boolean isNilConstructor()
public boolean isConsConstructor()
public boolean representsComprehension()
public boolean representsGenerator()
public boolean representsPair()
public boolean representsTuple()
public boolean representsList()
public boolean representsSingleton()
public void setNewScope()
public boolean newScope()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||