|
||||||||||
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.Literal edu.ksu.cis.projects.bogor.ast.IntLiteral
public final class IntLiteral
Int literal AST
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
IntLiteral(BigInteger integer)
Default base 10 constructor. |
|
IntLiteral(BigInteger integer,
Radix radix)
Default constructor. |
|
IntLiteral(int integer)
Equivalent to IntLiteral(BigInteger.valueOf(integer)) |
|
IntLiteral(int integer,
Radix radix)
Equivalent to IntLiteral(BigInteger.valueOf(integer), radix) |
Method Summary | |
---|---|
IntLiteral |
clone()
Clones this object (deep clone); including location info. |
BigInteger |
getInteger()
Gets the integer. |
Radix |
getRadix()
|
void |
negate()
Convert the numeric value of this node to -v , where
v is the value in the pre-state. |
void |
setInteger(BigInteger newInteger)
Sets the integer. |
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.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 |
---|
public IntLiteral(BigInteger integer, Radix radix)
integer
- The integer.radix
- Base used to encode the literal.public IntLiteral(BigInteger integer)
IntLiteral(integer, Radix.DECIMAL)
.
integer
- The integer.public IntLiteral(int integer)
IntLiteral(BigInteger.valueOf(integer))
integer
- The integer.public IntLiteral(int integer, Radix radix)
IntLiteral(BigInteger.valueOf(integer), radix)
integer
- The integer.radix
- Base used to encode the literal.Method Detail |
---|
public void setInteger(BigInteger newInteger)
newInteger
- The new integer.public BigInteger getInteger()
public void negate()
-v
, where
v
is the value in the pre-state.
negate
in interface NumericallyNegatableLiteral
public IntLiteral clone()
clone
in class Literal
public String toString()
toString
in class Node
public void visit(ASTVisitor visitor)
visit
in class Node
protected void setRadix(Radix newRadix)
public Radix getRadix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |