@ParametersAreNonnullByDefault public abstract class SoyAbstractList extends SoyAbstractValue implements SoyList
Important: Until this API is more stable and this note is removed, users must not define classes that extend this class.
| Constructor and Description |
|---|
SoyAbstractList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
coerceToBoolean()
This implementation is always truthy (to match JS behavior).
|
String |
coerceToString()
Coerces this value into a string.
|
boolean |
equals(Object other)
This implementation uses object identity (to match JS behavior).
|
SoyValue |
get(int index)
Gets a value of this SoyList.
|
protected int |
getIntegerIndex(SoyValue key)
Gets the integer index out of a SoyValue key, or throws SoyDataException if the key is not an
integer.
|
SoyValue |
getItem(SoyValue key)
Gets an item value of this SoyMap.
|
int |
getItemCnt()
Gets the number of items in this SoyMap.
|
Iterable<IntegerData> |
getItemKeys()
Gets an iterable over all item keys in this SoyMap.
|
SoyValueProvider |
getItemProvider(SoyValue key)
Gets a provider of an item value of this SoyMap.
|
boolean |
hasItem(SoyValue key)
Checks whether this SoyMap has an item with the given key.
|
void |
render(Appendable appendable)
Renders this value to the given appendable.
|
booleanValue, floatValue, integerValue, longValue, numberValue, renderAndResolve, resolve, status, stringValueclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasJavaList, asResolvedJavaList, getProvider, lengthbooleanValue, floatValue, integerValue, longValue, numberValue, stringValuerenderAndResolve, resolve, statuspublic final SoyValue get(int index)
SoyListpublic final int getItemCnt()
SoyMapgetItemCnt in interface SoyMap@Nonnull public final Iterable<IntegerData> getItemKeys()
SoyMapgetItemKeys in interface SoyMappublic final boolean hasItem(SoyValue key)
SoyMappublic final SoyValue getItem(SoyValue key)
SoyMappublic final SoyValueProvider getItemProvider(SoyValue key)
SoyMapgetItemProvider in interface SoyMapkey - The item key to get.protected final int getIntegerIndex(SoyValue key)
key - The SoyValue key.public final String coerceToString()
SoyValuecoerceToString in interface SoyValuepublic void render(Appendable appendable) throws IOException
SoyValueThis should behave identically to appendable.append(coerceToString()) but is
provided separately to allow more incremental approaches.
render in interface SoyValueappendable - The appendable to render to.IOExceptionpublic final boolean equals(Object other)
equals in interface SoyValueequals in class SoyAbstractValueother - The other value to compare against.public final boolean coerceToBoolean()
coerceToBoolean in interface SoyValue