程序包 cn.taketoday.ui
类 ExtendedModelMap
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.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addAllAttributes(Collection<?> attributeValues) Copy all attributes in the suppliedCollectioninto thisMap, using attribute name generation for each element.addAllAttributes(Map<String, ?> attributes) Copy all attributes in the suppliedMapinto thisMap.addAttribute(Object attributeValue) Add the supplied attribute to thisMapusing agenerated name.addAttribute(String attributeName, Object attributeValue) Add the supplied attribute under the supplied name.asMap()Convert this model to aMapmergeAttributes(Map<String, ?> attributes) Copy all attributes in the suppliedMapinto thisMap, with existing objects of the same name taking precedence (i.e. not getting replaced).从类继承的方法 cn.taketoday.ui.ModelMap
attributeNames, containsAttribute, getAttribute, removeAttribute, setAttribute从类继承的方法 java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values从类继承的方法 java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size从类继承的方法 java.util.AbstractMap
equals, hashCode, toString从接口继承的方法 java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size从接口继承的方法 cn.taketoday.ui.Model
attributeNames, clear, containsAttribute, getAttribute, getAttributeNames, isEmpty, removeAttribute, setAttribute, setAttributes
-
构造器详细资料
-
ExtendedModelMap
public ExtendedModelMap()
-
-
方法详细资料
-
addAttribute
从类复制的说明:ModelMapAdd the supplied attribute under the supplied name.- 指定者:
addAttribute在接口中Model- 覆盖:
addAttribute在类中ModelMap- 参数:
attributeName- the name of the model attribute (nevernull)attributeValue- the model attribute value (can benull)
-
addAttribute
从类复制的说明: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.- 指定者:
addAttribute在接口中Model- 覆盖:
addAttribute在类中ModelMap- 参数:
attributeValue- the model attribute value (nevernull)
-
addAllAttributes
从类复制的说明:ModelMapCopy all attributes in the suppliedCollectioninto thisMap, using attribute name generation for each element.- 指定者:
addAllAttributes在接口中Model- 覆盖:
addAllAttributes在类中ModelMap- 另请参阅:
-
addAllAttributes
从类复制的说明:ModelMapCopy all attributes in the suppliedMapinto thisMap.- 指定者:
addAllAttributes在接口中Model- 覆盖:
addAllAttributes在类中ModelMap- 另请参阅:
-
mergeAttributes
从类复制的说明:ModelMapCopy all attributes in the suppliedMapinto thisMap, with existing objects of the same name taking precedence (i.e. not getting replaced).- 指定者:
mergeAttributes在接口中Model- 覆盖:
mergeAttributes在类中ModelMap
-
asMap
从接口复制的说明:ModelConvert this model to aMap
-