@Immutable public final class FloatData extends NumberData
Important: This class may only be used in implementing plugins (e.g. functions, directives).
| Constructor and Description |
|---|
FloatData(double value)
Deprecated.
Use
forValue(double). |
| Modifier and Type | Method and Description |
|---|---|
double |
floatValue()
Precondition: Only call this method if you know that this SoyValue object is a float.
|
static FloatData |
forValue(double value)
Gets a FloatData instance for the given value.
|
double |
getValue()
Returns the float value.
|
boolean |
toBoolean()
Deprecated.
|
double |
toFloat()
Gets the float value of this number data object.
|
String |
toString()
This was a required method in the old SoyData interface.
|
static String |
toString(double value)
Returns Soy's idea of a double as a string.
|
equals, hashCode, numberValuerendercoerceToBoolean, coerceToString, createFromExistingDatabooleanValue, integerValue, longValue, renderAndResolve, resolve, status, stringValue@Deprecated public FloatData(double value)
forValue(double).value - The float value.public static FloatData forValue(double value)
value - The desired value.public double getValue()
public double floatValue()
SoyValuefloatValue in interface SoyValuefloatValue in class SoyAbstractValuepublic String toString()
SoyDatapublic static String toString(double value)
@Deprecated public boolean toBoolean()
0.0 is falsy as is NaN.
public double toFloat()
NumberDatatoFloat in class NumberData