@Immutable public abstract class StringData extends PrimitiveData
Important: This class may only be used in implementing plugins (e.g. functions, directives).
SoyValueProvider.ResolveStatus| Modifier and Type | Field and Description |
|---|---|
static StringData |
EMPTY_STRING
Static instance of StringData with value "".
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
This was a required method in the old SoyData interface.
|
static StringData |
forThunk(RenderableThunk thunk)
Returns a StringData instance for the given
RenderableThunk. |
static StringData |
forValue(String value)
Gets a StringData instance for the given value.
|
abstract String |
getValue()
Returns the string value.
|
int |
hashCode() |
String |
stringValue()
Precondition: Only call this method if you know that this SoyValue object is a string.
|
boolean |
toBoolean()
Deprecated.
|
String |
toString()
This was a required method in the old SoyData interface.
|
rendercoerceToBoolean, coerceToString, createFromExistingData, equalsbooleanValue, equals, floatValue, integerValue, longValue, numberValue, render, resolve, statuspublic static final StringData EMPTY_STRING
public static StringData forValue(String value)
value - The desired value.public static StringData forThunk(RenderableThunk thunk)
RenderableThunk.public abstract String getValue()
public String stringValue()
SoyValuestringValue in interface SoyValuestringValue in class SoyAbstractValuepublic String toString()
SoyData@Deprecated public boolean toBoolean()
The empty string is falsy.
public boolean equals(Object other)
SoyData