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

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

public final class ASTLongRangeType
extends ASTType
implements ILiteralParent

Long range type AST.

Version:
CVS $Revision: 1.7 $ $Date: 2005/05/06 19:33:49 $
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
ASTLongRangeType(LongLiteral lowLimit, LongLiteral highLimit, boolean wrap)
          Default constructor.
 
Method Summary
 ASTLongRangeType clone()
          Clones this object (deep clone); including location info.
 void dispose()
          Disposes lowConstant and highConstant.
 boolean equals(Object o)
           
 LongLiteral getHighLimit()
          Gets the high limit.
 LongLiteral getLowLimit()
          Gets the low limit.
 boolean getWrap()
          Gets the wrap.
 int hashCode()
           
 void setHighLimit(LongLiteral newHighLimit)
          Sets the high limit.
 void setLowLimit(LongLiteral newLowLimit)
          Sets the low limit.
 void setWrap(boolean newWrap)
          Sets the wrap.
 String toString()
          Returns the string representation of this object.
 void visit(ASTVisitor visitor)
           
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.ASTType
getParent, setParent
 
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node
getLocationInfo, getProperty, putProperty, setLocationInfo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTLongRangeType

public ASTLongRangeType(LongLiteral lowLimit,
                        LongLiteral highLimit,
                        boolean wrap)
Default constructor. Sets this object as the low and high limits's parent.

Parameters:
lowLimit - The low limit. Must be non-null.
highLimit - The high limit. Must be non-null.
wrap - The wrap.
Method Detail

setHighLimit

public void setHighLimit(LongLiteral newHighLimit)
Sets the high limit. Sets this object as the high limit's parent.

Parameters:
newHighLimit - The new high limit. Must be non-null.

getHighLimit

public LongLiteral getHighLimit()
Gets the high limit.

Returns:
The high limit. Non-null.

setLowLimit

public void setLowLimit(LongLiteral newLowLimit)
Sets the low limit. Sets this object as the low limit's parent.

Parameters:
newLowLimit - The new low constant. Must be non-null.

getLowLimit

public LongLiteral getLowLimit()
Gets the low limit.

Returns:
The low limit. Non-null.

setWrap

public void setWrap(boolean newWrap)
Sets the wrap.

Parameters:
newWrap - The new wrap. Must be non-null.

getWrap

public boolean getWrap()
Gets the wrap.

Returns:
The wrap.

clone

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

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

dispose

public void dispose()
Disposes lowConstant and highConstant. Once called, avoid using this object.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class ASTType

toString

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

Specified by:
toString in class Node
Returns:
"long [ wrap ](lowLimit, highLimit)".

visit

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

hashCode

public int hashCode()
Specified by:
hashCode in class ASTType

equals

public boolean equals(Object o)
Specified by:
equals in class ASTType