@ParametersAreNonnullByDefault public final class DictImpl extends SoyAbstractMap
SoyValueHelper.convert(java.lang.Object).
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Field and Description |
|---|---|
static DictImpl |
EMPTY
Empty, immutable dictionary.
|
protected Map<String,? extends SoyValueProvider> |
providerMap
Map containing each data provider.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,? extends SoyValueProvider> |
asJavaStringMap()
Gets a Java map of all items in this SoyDict, where mappings are string to value provider.
|
Map<String,? extends SoyValue> |
asResolvedJavaStringMap()
Gets a Java map of all items in this SoyDict, where mappings are string to value.
|
static DictImpl |
forProviderMap(Map<String,? extends SoyValueProvider> providerMap)
Creates a SoyDict implementation for a particular underlying provider map.
|
SoyValue |
getField(String name)
Gets a field value of this SoyRecord.
|
SoyValueProvider |
getFieldProvider(String name)
Gets a provider of a field value of this SoyRecord.
|
SoyValue |
getItem(SoyValue key)
Gets an item value of this SoyMap.
|
int |
getItemCnt()
Gets the number of items in this SoyMap.
|
Iterable<? extends SoyValue> |
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.
|
protected String |
getStringKey(SoyValue key) |
boolean |
hasField(String name)
Checks whether this SoyRecord has a field of the given name.
|
boolean |
hasItem(SoyValue key)
Checks whether this SoyMap has an item with the given key.
|
coerceToBoolean, coerceToString, equals, render, toStringbooleanValue, floatValue, integerValue, longValue, numberValue, renderAndResolve, resolve, status, stringValueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbooleanValue, coerceToBoolean, coerceToString, equals, floatValue, integerValue, longValue, numberValue, render, stringValuerenderAndResolve, resolve, statuspublic static final DictImpl EMPTY
protected final Map<String,? extends SoyValueProvider> providerMap
public static DictImpl forProviderMap(Map<String,? extends SoyValueProvider> providerMap)
The map may be mutable, but will not be mutated by the DictImpl.
public final boolean hasField(String name)
SoyRecordpublic final SoyValue getField(String name)
SoyRecordpublic final SoyValueProvider getFieldProvider(String name)
SoyRecordgetFieldProvider in interface SoyRecordname - The field name to get.public final int getItemCnt()
SoyMapgetItemCnt in interface SoyMap@Nonnull public final Iterable<? extends SoyValue> getItemKeys()
SoyMapgetItemKeys in interface SoyMappublic final boolean hasItem(SoyValue key)
SoyMappublic final SoyValue getItem(SoyValue key)
SoyMapgetItem in interface SoyMapgetItem in class SoyAbstractMapkey - The item key to get.public final SoyValueProvider getItemProvider(SoyValue key)
SoyMapgetItemProvider in interface SoyMapkey - The item key to get.@Nonnull public final Map<String,? extends SoyValueProvider> asJavaStringMap()
SoyDictasJavaStringMap in interface SoyDict@Nonnull public final Map<String,? extends SoyValue> asResolvedJavaStringMap()
SoyDictasResolvedJavaStringMap in interface SoyDict