edu.ksu.cis.projects.bogor.ast
Class FloatLiteral

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.ast.Node
      extended by edu.ksu.cis.projects.bogor.ast.Literal
          extended by edu.ksu.cis.projects.bogor.ast.FloatLiteral
All Implemented Interfaces:
NumericallyNegatableLiteral, Disposable, Serializable, Cloneable

public final class FloatLiteral
extends Literal
implements NumericallyNegatableLiteral

Float literal AST

Version:
CVS $Revision: 1.5 $ $Date: 2005/05/05 20:46:16 $
Author:
Robby
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node
ILLEGAL_LOCAL_ID_CHAR
 
Constructor Summary
FloatLiteral(float f)
          Default constructor.
 
Method Summary
 FloatLiteral clone()
          Clones this object (deep clone); including location info.
 float getFloat()
          Gets the float.
 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.
 String toString()
          Returns the string representation of this object.
 void visit(ASTVisitor visitor)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Literal
dispose, getParent, 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

FloatLiteral

public FloatLiteral(float f)
Default constructor.

Parameters:
f - The float.
Method Detail

setFloat

public void setFloat(float newFloat)
Sets the float.

Parameters:
newFloat - The new float.

getFloat

public float getFloat()
Gets the float.

Returns:
The float.

negate

public void negate()
Convert the numeric value of this node to -v, where v is the value in the pre-state.

Specified by:
negate in interface NumericallyNegatableLiteral

clone

public FloatLiteral clone()
Clones this object (deep clone); including location info.

Specified by:
clone in class Literal
Returns:
The clone of this object. Non-null.

toString

public String toString()
Returns the string representation of this object.

Specified by:
toString in class Node
Returns:
"float".

visit

public void visit(ASTVisitor visitor)
Specified by:
visit in class Node