|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.ast.Node
edu.ksu.cis.projects.bogor.ast.Constant
edu.ksu.cis.projects.bogor.ast.FloatConstant
public final class FloatConstant
Float constant AST
| Field Summary |
|---|
| Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
ILLEGAL_LOCAL_ID_CHAR |
| Constructor Summary | |
|---|---|
FloatConstant(String id,
float f)
Default constructor. |
|
FloatConstant(String id,
float f,
ASTType coercedType)
Default constructor. |
|
| Method Summary | |
|---|---|
FloatConstant |
clone()
Clones this object (deep clone); including location info. |
float |
getFloat()
Gets the float. |
String |
getId()
Gets the id. |
void |
negate()
Convert the numeric value of this node to -v, where
v is the value in the pre-state. |
void |
setFloat(float newFloat)
Sets the float. |
void |
setId(String newId)
Sets the id. |
String |
toString()
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
| Methods inherited from class edu.ksu.cis.projects.bogor.ast.Constant |
|---|
dispose, getOptionalCoercedType, getParent, setCoercedType, setParent |
| Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
getLocationInfo, getProperty, putProperty, setLocationInfo |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FloatConstant(String id,
float f)
id - The id. Must be non-null.f - The float.
public FloatConstant(String id,
float f,
ASTType coercedType)
id - The id. Must be non-null.f - The float.coercedType - The type to which the value is cast. Must be non-null.| Method Detail |
|---|
public void setFloat(float newFloat)
newFloat - The new float.public float getFloat()
public void negate()
-v, where
v is the value in the pre-state.
negate in interface NumericallyNegatableLiteralpublic void setId(String newId)
newId - The new id. Must be non-null.public String getId()
public FloatConstant clone()
clone in class Constantpublic String toString()
toString in class Nodepublic void visit(ASTVisitor visitor)
visit in class Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||