|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norecess.citkit.tir.expressions.BooleanETIR
public class BooleanETIR
A way to represent boolean values in Hobbes. There are three ways to get a
BooleanETIR
: use the constant TRUE
, use the constant
FALSE
, or use create(boolean)
to return the appropriate
constant.
However, since BooleanETIR
can have a position, do
not use ==
for an equality test unless you are
certain that you're using only the constants.
Field Summary | |
---|---|
static BooleanETIR |
FALSE
Handy constant for a false value. |
static BooleanETIR |
TRUE
Handy constant for a true value. |
Constructor Summary | |
---|---|
BooleanETIR(boolean value)
|
|
BooleanETIR(IPosition position,
boolean value)
|
|
BooleanETIR(IPosition position,
java.lang.String value)
|
|
BooleanETIR(java.lang.String value)
|
Method Summary | ||
---|---|---|
|
accept(ExpressionTIRVisitor<A> visitor)
Implements the visitor pattern with ExpressionTIRVisitor . |
|
static BooleanETIR |
create(boolean bool)
Factory method to return TRUE or FALSE . |
|
boolean |
equals(java.lang.Object obj)
|
|
IPosition |
getPosition()
The position of the TIR in the source code. |
|
HobbesType |
getType()
Retrieves the type of the expression. |
|
boolean |
getValue()
Returns the actual value for this BooleanETIR . |
|
int |
hashCode()
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BooleanETIR TRUE
public static final BooleanETIR FALSE
Constructor Detail |
---|
public BooleanETIR(IPosition position, boolean value)
public BooleanETIR(boolean value)
public BooleanETIR(IPosition position, java.lang.String value)
public BooleanETIR(java.lang.String value)
Method Detail |
---|
public static BooleanETIR create(boolean bool)
TRUE
or FALSE
.
bool
- the boolean value to convert.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean getValue()
BooleanETIR
.
getValue
in interface IBooleanETIR
public <A> A accept(ExpressionTIRVisitor<A> visitor)
ExpressionTIR
ExpressionTIRVisitor
.
accept
in interface ExpressionTIR
visitor
- the visitor object.
public HobbesType getType()
ExpressionTIR
getType
in interface DatumTIR
getType
in interface ExpressionTIR
public IPosition getPosition()
HobbesTIR
getPosition
in interface HobbesTIR
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |