@ParametersAreNonnullByDefault public interface SoyEasyDict extends SoyDict
In map usage, the item keys are the record field names in the form of StringData.
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 |
|---|---|
void |
del(String dottedName)
Deletes a subfield of this dict.
|
void |
delField(String name)
Deletes a field of this dict.
|
SoyValue |
get(String dottedName)
Gets a subfield value of this dict.
|
SoyValueProvider |
getProvider(String dottedName)
Gets a provider of a subfield value of this dict.
|
boolean |
has(String dottedName)
Checks whether this dict has a subfield at the given dotted name.
|
SoyEasyDict |
makeImmutable()
Makes this dict immutable.
|
void |
set(String dottedName,
Object value)
Sets a subfield of this dict.
|
void |
setField(String name,
SoyValueProvider valueProvider)
Sets a field of this dict.
|
void |
setFieldsFromJavaStringMap(Map<String,?> javaStringMap)
Sets fields on this dict from a Java string-keyed map.
|
void |
setItemsFromDict(SoyDict dict)
Sets items in this dict from another dict.
|
asJavaStringMap, asResolvedJavaStringMapgetField, getFieldProvider, hasFieldgetItem, getItemCnt, getItemKeys, getItemProvider, hasItembooleanValue, coerceToBoolean, coerceToString, equals, floatValue, integerValue, longValue, numberValue, render, stringValuerenderAndResolve, resolve, statusvoid setField(String name, SoyValueProvider valueProvider)
name - The field name to set.valueProvider - A provider of the field value for the given field name. Note that this is
often just the field value itself, since all values are also providers.void delField(String name)
name - The field name to delete.void setItemsFromDict(SoyDict dict)
dict - A dict of the fields to set.void setFieldsFromJavaStringMap(Map<String,?> javaStringMap)
javaStringMap - A Java string-keyed map of the fields to set.void set(String dottedName, @Nullable Object value)
dottedName - The dotted name to set (one or more field names, dot-separated).value - The subfield value for the given dotted name. If it's not a SoyValueProvider
(includes SoyValue), it will be converted.void del(String dottedName)
dottedName - The dotted name to delete (one or more field names, dot-separated).boolean has(String dottedName)
dottedName - The dotted name to check (one or more field names, dot-separated).SoyValue get(String dottedName)
dottedName - The dotted name to get (one or more field names, dot-separated).SoyValueProvider getProvider(String dottedName)
dottedName - The dotted name to get (one or more field names, dot-separated).SoyEasyDict makeImmutable()