|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.Node edu.ksu.cis.projects.bogor.ast.Constant edu.ksu.cis.projects.bogor.ast.LongConstant
public final class LongConstant
Long constant AST
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
LongConstant(String id,
BigInteger l)
Default base 10 constructor. |
|
LongConstant(String id,
BigInteger l,
ASTType coercedType)
Default base 10 constructor. |
|
LongConstant(String id,
BigInteger l,
Radix radix)
Default constructor. |
|
LongConstant(String id,
BigInteger l,
Radix radix,
ASTType coercedType)
Default constructor. |
|
LongConstant(String id,
long l)
Default base 10 constructor. |
|
LongConstant(String id,
long l,
ASTType coercedType)
Default base 10 constructor. |
|
LongConstant(String id,
long l,
Radix radix)
Default constructor. |
|
LongConstant(String id,
long l,
Radix radix,
ASTType coercedType)
Default constructor. |
Method Summary | |
---|---|
LongConstant |
clone()
Clones this object (deep clone); including location info. |
String |
getId()
Gets the id. |
BigInteger |
getLong()
Gets the long. |
Radix |
getRadix()
|
void |
negate()
Convert the numeric value of this node to -v , where
v is the value in the pre-state. |
void |
setId(String newId)
Sets the id. |
void |
setLong(BigInteger newLong)
Sets the long. |
protected void |
setRadix(Radix newRadix)
|
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 LongConstant(String id, BigInteger l, Radix radix)
id
- The id. Must be non-null.radix
- Base used to encode the value.l
- The long.public LongConstant(String id, long l, Radix radix)
id
- The id. Must be non-null.radix
- Base used to encode the value.l
- The long.public LongConstant(String id, BigInteger l)
LongConstant(id, l, Radix.DECIMAL)
id
- The id. Must be non-null.l
- The long.public LongConstant(String id, long l)
LongConstant(id, l, Radix.DECIMAL)
id
- The id. Must be non-null.l
- The long.public LongConstant(String id, BigInteger l, Radix radix, ASTType coercedType)
id
- The id. Must be non-null.l
- The long.radix
- Base used to encode the value.coercedType
- The type to which the value is cast. Must be non-null.public LongConstant(String id, long l, Radix radix, ASTType coercedType)
id
- The id. Must be non-null.l
- The long.radix
- Base used to encode the value.coercedType
- The type to which the value is cast. Must be non-null.public LongConstant(String id, BigInteger l, ASTType coercedType)
LongConstant(id, l, Radix.DECIMAL, coercedType)
id
- The id. Must be non-null.l
- The long.coercedType
- The type to which the value is cast. Must be non-null.public LongConstant(String id, long l, ASTType coercedType)
LongConstant(id, l, Radix.DECIMAL, coercedType)
id
- The id. Must be non-null.l
- The long.coercedType
- The type to which the value is cast. Must be non-null.Method Detail |
---|
public void setId(String newId)
newId
- The new id. Must be non-null.public String getId()
public void setLong(BigInteger newLong)
newLong
- The new long.public BigInteger getLong()
public void negate()
-v
, where
v
is the value in the pre-state.
negate
in interface NumericallyNegatableLiteral
protected void setRadix(Radix newRadix)
public Radix getRadix()
public LongConstant clone()
clone
in class Constant
public String toString()
toString
in class Node
public void visit(ASTVisitor visitor)
visit
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |