@ParametersAreNonnullByDefault public interface SoyValue extends SoyValueProvider
Important: Until this API is more stable and this note is removed, users must not define classes that implement this interface.
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Precondition: Only call this method if you know that this SoyValue object is a boolean.
|
boolean |
coerceToBoolean()
Coerces this value into a boolean.
|
String |
coerceToString()
Coerces this value into a string.
|
boolean |
equals(Object other)
Compares this value against another for equality in the sense of the '==' operator of Soy.
|
double |
floatValue()
Precondition: Only call this method if you know that this SoyValue object is a float.
|
int |
integerValue()
Precondition: Only call this method if you know that this SoyValue object is a 32-bit integer.
|
long |
longValue()
Precondition: Only call this method if you know that this SoyValue object is an integer
or long.
|
double |
numberValue()
Precondition: Only call this method if you know that this SoyValue object is a number.
|
void |
render(Appendable appendable)
Renders this value to the given appendable.
|
String |
stringValue()
Precondition: Only call this method if you know that this SoyValue object is a string.
|
renderAndResolve, resolve, statusboolean equals(Object other)
boolean coerceToBoolean()
String coerceToString()
void render(Appendable appendable) throws IOException
This should behave identically to appendable.append(coerceToString()) but is
provided separately to allow more incremental approaches.
appendable - The appendable to render to.IOExceptionboolean booleanValue()
SoyDataException - If this object is not actually a boolean.int integerValue()
SoyDataException - If this object is not actually an integer.long longValue()
SoyDataException - If this object is not actually an integer.double floatValue()
SoyDataException - If this object is not actually a float.double numberValue()
SoyDataException - If this object is not actually a number.String stringValue()
SoyDataException - If this object is not actually a string.