|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean getValue()
BooleanETIR.
getValue in interface IBooleanETIRpublic <A> A accept(ExpressionTIRVisitor<A> visitor)
ExpressionTIRExpressionTIRVisitor.
accept in interface ExpressionTIRvisitor - the visitor object.
public HobbesType getType()
ExpressionTIR
getType in interface DatumTIRgetType in interface ExpressionTIRpublic IPosition getPosition()
HobbesTIR
getPosition in interface HobbesTIRpublic 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 | |||||||||