public class FloatLiteral extends Literal
| Constructor and Description |
|---|
FloatLiteral(double value)
Constructs a float literal with the specified value.
|
FloatLiteral(double value,
java.lang.String suffix)
Constructs a float literal with the specified value and suffix.
|
| Modifier and Type | Method and Description |
|---|---|
FloatLiteral |
clone()
Returns a clone of the float literal.
|
static void |
defaultPrint(FloatLiteral l,
java.io.PrintWriter o)
Prints a literal to a stream.
|
boolean |
equals(java.lang.Object o)
Compare the float literal with the specified object for equality.
|
double |
getValue()
Returns the numeric value of the float literal.
|
int |
hashCode()
Returns the hash code of the float literal.
|
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 |
setSuffix(java.lang.String suffix)
Sets the suffix of the float literal with the specified string.
|
void |
setValue(double value)
Sets the value of the float literal with the specified value.
|
java.lang.String |
toString()
Returns a string representation of the float literal.
|
compareTo, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verifypublic FloatLiteral(double value)
public FloatLiteral(double value,
java.lang.String suffix)
public FloatLiteral clone()
public static void defaultPrint(FloatLiteral 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 double getValue()
public int hashCode()
hashCode in class Expressionpublic static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setValue(double value)
public void setSuffix(java.lang.String suffix)