public class BooleanLiteral extends Literal
| Constructor and Description |
|---|
BooleanLiteral(boolean value)
Constructs a boolean literal with the specified boolean value.
|
| Modifier and Type | Method and Description |
|---|---|
BooleanLiteral |
clone()
Returns a clone of the boolean literal.
|
static void |
defaultPrint(BooleanLiteral l,
java.io.PrintWriter o)
Prints a literal to a stream.
|
boolean |
equals(java.lang.Object o)
Compares the boolean literal with the specified object.
|
boolean |
getValue()
Returns the boolean value.
|
int |
hashCode()
Returns the hash code of the expression.
|
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently
created objects will use the supplied method.
|
void |
setValue(boolean value)
Set the boolean value of this object.
|
java.lang.String |
toString()
Returns a string representation of the boolean literal.
|
compareTo, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verifypublic BooleanLiteral(boolean value)
value - the boolean value.public BooleanLiteral clone()
public static void defaultPrint(BooleanLiteral l, java.io.PrintWriter o)
l - The literal to print.o - The writer on which to print the literal.public java.lang.String toString()
toString in class Expressionpublic boolean equals(java.lang.Object o)
equals in class Expressiono - the object to be compared with.o!=null, this.getClass()==o.getClass(),
and this.children.equals(o.children) ||
this.children==o.children==nullpublic boolean getValue()
public int hashCode()
ExpressionhashCode in class Expressionpublic static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setValue(boolean value)