@ParametersAreNonnullByDefault public final class ListImpl extends SoyAbstractValue
SoyValueConverter.convert(java.lang.Object).
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Field and Description |
|---|---|
protected List<? extends SoyValueProvider> |
providerList
Backing list of providers.
|
| Modifier and Type | Method and Description |
|---|---|
List<? extends SoyValueProvider> |
asJavaList()
Gets a Java list of all value providers in this SoyList.
|
List<SoyValue> |
asResolvedJavaList()
Gets a Java list all values in this SoyList.
|
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).
|
static ListImpl |
forProviderList(com.google.common.collect.ImmutableList<? extends SoyValueProvider> providerList)
Creates a Soy list implementation backed by the given list.
|
static ListImpl |
forProviderList(List<? extends SoyValueProvider> providerList)
Creates a Soy list implementation backed by the given list.
|
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.
|
SoyValueProvider |
getProvider(int index)
Gets a provider of a value of this SoyList.
|
int |
hashCode() |
boolean |
hasItem(SoyValue key)
Checks whether this SoyMap has an item with the given key.
|
int |
length()
Gets the length of this SoyList.
|
void |
render(LoggingAdvisingAppendable appendable)
Renders this value to the given appendable.
|
booleanValue, floatValue, integerValue, longValue, numberValue, render, renderAndResolve, resolve, status, stringValueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitbooleanValue, floatValue, integerValue, longValue, numberValue, render, stringValuerenderAndResolve, resolve, statusprotected final List<? extends SoyValueProvider> providerList
public static ListImpl forProviderList(List<? extends SoyValueProvider> providerList)
public static ListImpl forProviderList(com.google.common.collect.ImmutableList<? extends SoyValueProvider> providerList)
public final int length()
SoyList@Nonnull public final List<? extends SoyValueProvider> asJavaList()
SoyListasJavaList in interface SoyList@Nonnull public final List<SoyValue> asResolvedJavaList()
SoyListasResolvedJavaList in interface SoyListpublic final SoyValue get(int index)
SoyListpublic final SoyValueProvider getProvider(int index)
SoyListgetProvider in interface SoyListindex - The index to get.public final int getItemCnt()
SoyLegacyObjectMapgetItemCnt in interface SoyLegacyObjectMap@Nonnull public final Iterable<IntegerData> getItemKeys()
SoyLegacyObjectMapImportant: Iteration order is undefined.
getItemKeys in interface SoyLegacyObjectMappublic final boolean hasItem(SoyValue key)
SoyLegacyObjectMaphasItem in interface SoyLegacyObjectMapkey - The item key to check.public final SoyValue getItem(SoyValue key)
SoyLegacyObjectMapgetItem in interface SoyLegacyObjectMapkey - The item key to get.public final SoyValueProvider getItemProvider(SoyValue key)
SoyLegacyObjectMapgetItemProvider in interface SoyLegacyObjectMapkey - The item key to get.protected final int getIntegerIndex(SoyValue key)
key - The SoyValue key.public final boolean equals(Object other)
Note: Users will eventually be able to create their own implementations if they desire.
equals in interface SoyValueequals in class SoyAbstractValueother - The other value to compare against.public final boolean coerceToBoolean()
Note: Users will eventually be able to create their own implementations if they desire.
coerceToBoolean in interface SoyValuepublic final String coerceToString()
SoyValuecoerceToString in interface SoyValuepublic void render(LoggingAdvisingAppendable 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.IOException