org.springframework.ui

## 类 ExtendedModelMap

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<K,V>
    - - java.util.LinkedHashMap<String,Object>
      - - org.springframework.ui.ModelMap
        - - org.springframework.ui.ExtendedModelMap

- 所有已实现的接口:
    Serializable, Cloneable, Map<String,Object>, Model
  直接已知子类:
    BindingAwareModelMap

      public class ExtendedModelMap
      extends ModelMap
      implements Model

  Subclass of `ModelMap` that implements the `Model` interface. Java 5 specific like the `Model` interface itself.

  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.

  从以下版本开始:
    2.5.1
  作者:
    Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 嵌套类概要

    - ### 从类继承的嵌套类/接口 java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

  - ### 构造器概要

    构造器
    构造器和说明
    `ExtendedModelMap()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `ExtendedModelMap` | `addAllAttributes(Collection<?> attributeValues)` Copy all attributes in the supplied `Collection` into this `Map`, using attribute name generation for each element.
    `ExtendedModelMap` | `addAllAttributes(Map<String,?> attributes)` Copy all attributes in the supplied `Map` into this `Map`.
    `ExtendedModelMap` | `addAttribute(Object attributeValue)` Add the supplied attribute to this `Map` using a `generated name`.
    `ExtendedModelMap` | `addAttribute(String attributeName, Object attributeValue)` Add the supplied attribute under the supplied name.
    `Map<String,Object>` | `asMap()` Return the current set of model attributes as a Map.
    `ExtendedModelMap` | `mergeAttributes(Map<String,?> attributes)` Copy all attributes in the supplied `Map` into this `Map`, with existing objects of the same name taking precedence (i.e. not getting replaced).

    - ### 从类继承的方法 org.springframework.ui.ModelMap

      `containsAttribute`

    - ### 从类继承的方法 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.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### 从接口继承的方法 org.springframework.ui.Model

      `containsAttribute`

    - ### 从接口继承的方法 java.util.Map

      `compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

- - ### 构造器详细资料

    - #### ExtendedModelMap

          public ExtendedModelMap()

  - ### 方法详细资料

    - #### addAttribute

          public ExtendedModelMap addAttribute(String attributeName,
                                               @Nullable
                                               Object attributeValue)

      从类复制的说明: `ModelMap`
      Add the supplied attribute under the supplied name.
      指定者:
        `addAttribute` 在接口中 `Model`
      覆盖:
        `addAttribute` 在类中 `ModelMap`
      参数:
        `attributeName` - the name of the model attribute (never `null`)
        `attributeValue` - the model attribute value (can be `null`)

    - #### addAttribute

          public ExtendedModelMap addAttribute(Object attributeValue)

      从类复制的说明: `ModelMap`
      Add the supplied attribute to this `Map` using a `generated name`.

      Note: Empty `Collections` are not added to the model when using this method because we cannot correctly determine the true convention name. View code should check for `null` rather than for empty collections as is already done by JSTL tags.

      指定者:
        `addAttribute` 在接口中 `Model`
      覆盖:
        `addAttribute` 在类中 `ModelMap`
      参数:
        `attributeValue` - the model attribute value (never `null`)

    - #### addAllAttributes

          public ExtendedModelMap addAllAttributes(@Nullable
                                                   Collection<?> attributeValues)

      从类复制的说明: `ModelMap`
      Copy all attributes in the supplied `Collection` into this `Map`, using attribute name generation for each element.
      指定者:
        `addAllAttributes` 在接口中 `Model`
      覆盖:
        `addAllAttributes` 在类中 `ModelMap`
      另请参阅:
        `ModelMap.addAttribute(Object)`

    - #### addAllAttributes

          public ExtendedModelMap addAllAttributes(@Nullable
                                                   Map<String,?> attributes)

      从类复制的说明: `ModelMap`
      Copy all attributes in the supplied `Map` into this `Map`.
      指定者:
        `addAllAttributes` 在接口中 `Model`
      覆盖:
        `addAllAttributes` 在类中 `ModelMap`
      另请参阅:
        `ModelMap.addAttribute(String, Object)`

    - #### mergeAttributes

          public ExtendedModelMap mergeAttributes(@Nullable
                                                  Map<String,?> attributes)

      从类复制的说明: `ModelMap`
      Copy all attributes in the supplied `Map` into this `Map`, with existing objects of the same name taking precedence (i.e. not getting replaced).
      指定者:
        `mergeAttributes` 在接口中 `Model`
      覆盖:
        `mergeAttributes` 在类中 `ModelMap`

    - #### asMap

          public Map<String,Object> asMap()

      从接口复制的说明: `Model`
      Return the current set of model attributes as a Map.
      指定者:
        `asMap` 在接口中 `Model`