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

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

public final class BooleanConstant
extends Constant

Boolean constant AST.

Version:
CVS $Revision: 1.6 $ $Date: 2005/05/06 17:25:18 $
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
BooleanConstant(String id, boolean bool)
          Default constructor.
BooleanConstant(String id, boolean bool, ASTType coercedType)
          Default constructor.
 
Method Summary
 BooleanConstant clone()
          Clones this object (deep clone); including location info.
 boolean getBool()
          Gets the boolean.
 String getId()
          Gets the id.
 void setBool(boolean newBoolean)
          Sets the boolean.
 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

BooleanConstant

public BooleanConstant(String id,
                       boolean bool)
Default constructor.

Parameters:
id - The id. Must be non-null.
bool - The boolean.

BooleanConstant

public BooleanConstant(String id,
                       boolean bool,
                       ASTType coercedType)
Default constructor.

Parameters:
id - The id. Must be non-null.
bool - The boolean.
coercedType - The type to which the value is cast. Must be non-null.
Method Detail

setBool

public void setBool(boolean newBoolean)
Sets the boolean.

Parameters:
newBoolean - The new boolean.

getBool

public boolean getBool()
Gets the boolean.

Returns:
The boolean.

setId

public void setId(String newId)
Sets the id.

Parameters:
newId - The new id. Must be non-null.

getId

public String getId()
Gets the id.

Returns:
The id. Non-null.

clone

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

Specified by:
clone in class Constant
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:
"id = bool".

visit

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