public class ExtendedModelMap extends ModelMap implements Model
ModelMap that implements the Model interface.
Java 5 specific like the Model interface itself.| Constructor and Description |
|---|
ExtendedModelMap() |
| Modifier and Type | Method and Description |
|---|---|
ExtendedModelMap |
addAllAttributes(java.util.Collection<?> attributeValues)
Copy all attributes in the supplied
Collection into this
Map, using attribute name generation for each element. |
ExtendedModelMap |
addAllAttributes(java.util.Map<java.lang.String,?> attributes)
Copy all attributes in the supplied
Map into this Map. |
ExtendedModelMap |
addAttribute(java.lang.Object attributeValue)
Add the supplied attribute to this
Map using a
generated name. |
ExtendedModelMap |
addAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Add the supplied attribute under the supplied name.
|
java.util.Map<java.lang.String,java.lang.Object> |
asMap()
Return the current set of model attributes as a Map.
|
ExtendedModelMap |
mergeAttributes(java.util.Map<java.lang.String,?> attributes)
Copy all attributes in the supplied
Map into this Map,
with existing objects of the same name taking precedence (i.e. |
containsAttributeclear, containsValue, forEach, get, removeEldestEntry, replaceAllclone, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAttributepublic ExtendedModelMap addAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
ModelMapaddAttribute in interface ModeladdAttribute in class ModelMapattributeName - the name of the model attribute (never null)attributeValue - the model attribute value (can be null)public ExtendedModelMap addAttribute(java.lang.Object attributeValue)
ModelMapMap using a
generated name.
null rather
than for empty collections as is already done by JSTL tags.
addAttribute in interface ModeladdAttribute in class ModelMapattributeValue - the model attribute value (never null)public ExtendedModelMap addAllAttributes(java.util.Collection<?> attributeValues)
ModelMapCollection into this
Map, using attribute name generation for each element.addAllAttributes in interface ModeladdAllAttributes in class ModelMapModelMap.addAttribute(Object)public ExtendedModelMap addAllAttributes(java.util.Map<java.lang.String,?> attributes)
ModelMapMap into this Map.addAllAttributes in interface ModeladdAllAttributes in class ModelMapModelMap.addAttribute(String, Object)public ExtendedModelMap mergeAttributes(java.util.Map<java.lang.String,?> attributes)
ModelMapMap into this Map,
with existing objects of the same name taking precedence (i.e. not getting
replaced).mergeAttributes in interface ModelmergeAttributes in class ModelMap