|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.Compiler.Expression
SFE.Compiler.ConstExpression
SFE.Compiler.BooleanConstant
public class BooleanConstant
The BooleanConstant class represents boolean consts expressions that can appear in the program.
Field Summary | |
---|---|
static java.util.Vector |
inputFormat
|
Constructor Summary | |
---|---|
BooleanConstant(boolean booleanConst)
Constructs a new BooleanConstant from a given boolean const |
Method Summary | |
---|---|
Expression |
bitAt(int i)
Returns Expression that represents the bit at place i of this Expression. |
boolean |
getConst()
Returns the boolean stored in this BooleanConstant |
int |
size()
Returns 1, as the number of bits needed to represent this BooleanConstant expression. |
void |
toCircuit(java.io.PrintWriter circuit)
Writes this constant into the circuit file. |
java.lang.String |
toString()
Returns a string representation of the object. |
int |
value()
Returns the value stored in this BooleanConstant (0 or 1) |
Methods inherited from class SFE.Compiler.Expression |
---|
duplicate, evaluateExpression, hasSharedInput |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Vector inputFormat
Constructor Detail |
---|
public BooleanConstant(boolean booleanConst)
booleanConst
- the given boolean constantMethod Detail |
---|
public int size()
size
in class Expression
public java.lang.String toString()
toString
in class java.lang.Object
public int value()
value
in class ConstExpression
public boolean getConst()
public Expression bitAt(int i)
bitAt
in class Expression
public void toCircuit(java.io.PrintWriter circuit)
circuit
- the output circuit.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |