|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.template.soy.data.SoyData
com.google.template.soy.data.restricted.PrimitiveData
com.google.template.soy.data.restricted.NumberData
public abstract class NumberData
Abstract superclass for number data (integers and floats).
Important: This class may only be used in implementing plugins (e.g. functions, directives).
| Constructor Summary | |
|---|---|
NumberData()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Compares this data object against another for equality in the sense of the operator '==' for Soy expressions. |
int |
hashCode()
|
double |
numberValue()
Precondition: Only call this method if you know that this SoyData object is a number. |
abstract double |
toFloat()
Gets the float value of this number data object. |
| Methods inherited from class com.google.template.soy.data.SoyData |
|---|
booleanValue, createFromExistingData, createFromExistingData, floatValue, integerValue, stringValue, toBoolean, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberData()
| Method Detail |
|---|
public abstract double toFloat()
public double numberValue()
SoyData
numberValue in class SoyDatapublic boolean equals(Object other)
SoyData
equals in class SoyDataother - The other data object to compare against.
public int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||