Class ExtendedModelMap
java.lang.Object
java.util.AbstractMap<String,Object>
 
java.util.HashMap<String,Object>
 
java.util.LinkedHashMap<String,Object>
 
org.springframework.ui.ModelMap
org.springframework.ui.ExtendedModelMap
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,- Object>, SequencedMap<String, - Object>, Model 
- Direct Known Subclasses:
- BindingAwareModelMap
Subclass of 
ModelMap that implements the Model interface.
This is an implementation class exposed to handler methods by Spring MVC, typically via
a declaration of the Model interface. There is no need to
build it within user code; a plain ModelMap or even a just
a regular Map with String keys will be good enough to return a user model.
- Since:
- 2.5.1
- Author:
- Juergen Hoeller
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddAllAttributes(@Nullable Collection<?> attributeValues) Copy all attributes in the suppliedCollectioninto thisMap, using attribute name generation for each element.addAllAttributes(@Nullable Map<String, ?> attributes) Copy all attributes in the suppliedMapinto thisMap.addAttribute(Object attributeValue) Add the supplied attribute to thisMapusing agenerated name.addAttribute(String attributeName, @Nullable Object attributeValue) Add the supplied attribute under the supplied name.asMap()Return the current set of model attributes as a Map.mergeAttributes(@Nullable Map<String, ?> attributes) Copy all attributes in the suppliedMapinto thisMap, with existing objects of the same name taking precedence (i.e.Methods inherited from class ModelMapcontainsAttribute, getAttributeMethods inherited from class LinkedHashMapclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMapclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMapequals, hashCode, toStringMethods inherited from interface Mapcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface ModelcontainsAttribute, getAttributeMethods inherited from interface SequencedMapfirstEntry, lastEntry, pollFirstEntry, pollLastEntry
- 
Constructor Details- 
ExtendedModelMappublic ExtendedModelMap()
 
- 
- 
Method Details- 
addAttributeDescription copied from class:ModelMapAdd the supplied attribute under the supplied name.- Specified by:
- addAttributein interface- Model
- Overrides:
- addAttributein class- ModelMap
- Parameters:
- attributeName- the name of the model attribute (never- null)
- attributeValue- the model attribute value (can be- null)
 
- 
addAttributeDescription copied from class:ModelMapAdd the supplied attribute to thisMapusing agenerated name.Note: Empty Collectionsare not added to the model when using this method because we cannot correctly determine the true convention name. View code should check fornullrather than for empty collections as is already done by JSTL tags.- Specified by:
- addAttributein interface- Model
- Overrides:
- addAttributein class- ModelMap
- Parameters:
- attributeValue- the model attribute value (never- null)
 
- 
addAllAttributesDescription copied from class:ModelMapCopy all attributes in the suppliedCollectioninto thisMap, using attribute name generation for each element.- Specified by:
- addAllAttributesin interface- Model
- Overrides:
- addAllAttributesin class- ModelMap
- See Also:
 
- 
addAllAttributesDescription copied from class:ModelMapCopy all attributes in the suppliedMapinto thisMap.- Specified by:
- addAllAttributesin interface- Model
- Overrides:
- addAllAttributesin class- ModelMap
- See Also:
 
- 
mergeAttributesDescription copied from class:ModelMapCopy all attributes in the suppliedMapinto thisMap, with existing objects of the same name taking precedence (i.e. not getting replaced).- Specified by:
- mergeAttributesin interface- Model
- Overrides:
- mergeAttributesin class- ModelMap
 
- 
asMap
 
-