public abstract class CollectionData extends SoyData
Important: Do not use outside of Soy code (treat as superpackage-private).
Important: Even though this class is not marked 'final', do not extend this class.
| Constructor and Description |
|---|
CollectionData() |
| Modifier and Type | Method and Description |
|---|---|
protected static SoyData |
ensureValidValue(SoyData value)
Ensures that the given value is valid for insertion into a Soy data tree.
|
SoyData |
get(String keyStr)
Gets the data at the specified key string.
|
boolean |
getBoolean(String keyStr)
Precondition: The specified key string is the path to a boolean.
|
double |
getFloat(String keyStr)
Precondition: The specified key string is the path to a float.
|
int |
getInteger(String keyStr)
Precondition: The specified key string is the path to an integer.
|
SoyListData |
getListData(String keyStr)
Precondition: The specified key string is the path to a SoyListData object.
|
long |
getLong(String keyStr)
Precondition: The specified key string is the path to a long.
|
SoyMapData |
getMapData(String keyStr)
Precondition: The specified key string is the path to a SoyMapData object.
|
abstract SoyData |
getSingle(String key)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
String |
getString(String keyStr)
Precondition: The specified key string is the path to a string.
|
void |
put(Object... data)
Convenience function to put multiple mappings in one call.
|
void |
put(String keyStr,
boolean value)
Puts data into this data tree at the specified key string.
|
void |
put(String keyStr,
double value)
Puts data into this data tree at the specified key string.
|
void |
put(String keyStr,
int value)
Puts data into this data tree at the specified key string.
|
void |
put(String keyStr,
long value)
Puts data into this data tree at the specified key string.
|
void |
put(String keyStr,
SoyData value)
Puts data into this data tree at the specified key string.
|
void |
put(String keyStr,
String value)
Puts data into this data tree at the specified key string.
|
abstract void |
putSingle(String key,
SoyData value)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
void |
remove(String keyStr)
Removes the data at the specified key string.
|
abstract void |
removeSingle(String key)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
createFromExistingDatabooleanValue, equals, floatValue, integerValue, longValue, numberValue, render, renderAndResolve, resolve, status, stringValueclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcoerceToBoolean, coerceToString, renderpublic void put(Object... data)
data - The mappings to put, as alternating keys/values. Indices 0, 2, 4, ... must be valid
key strings. Indices 1, 3, 5, ... must be valid Soy data values.SoyDataException - When attempting to add an invalid varargs list or a mapping containing
an invalid key.public void put(String keyStr, SoyData value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void put(String keyStr, boolean value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void put(String keyStr, int value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void put(String keyStr, long value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void put(String keyStr, double value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void put(String keyStr, String value)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.value - The data to put at the specified location.public void remove(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.public SoyData get(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.public SoyMapData getMapData(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.public SoyListData getListData(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.public boolean getBoolean(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.IllegalArgumentException - If no data is stored at the specified key.public int getInteger(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.IllegalArgumentException - If no data is stored at the specified key.public long getLong(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.IllegalArgumentException - If no data is stored at the specified key.public double getFloat(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.IllegalArgumentException - If no data is stored at the specified key.public String getString(String keyStr)
keyStr - One or more map keys and/or list indices (separated by '.' if multiple parts).
Indicates the path to the location within this data tree.IllegalArgumentException - If no data is stored at the specified key.public abstract void putSingle(String key, SoyData value)
Puts data into this data object at the specified key.
key - An individual key.value - The data to put at the specified key.public abstract void removeSingle(String key)
Removes the data at the specified key.
key - An individual key.public abstract SoyData getSingle(String key)
Gets the data at the specified key.
key - An individual key.protected static SoyData ensureValidValue(SoyData value)
value - The value to ensure validity for.