Primarily designed for adding attributes to the model.
Allows for accessing the overall model as a java.util.Map.
| Modifier and Type | Method and Description |
|---|---|
| public Model | addAllAttributes(Collection<?> attributeValues)
Copy all attributes in the supplied |
| public Model | |
| public Model | addAttribute(String
the name of the model attribute (never attributeName, Object null)the model attribute value (can be attributeValue)null)Add the supplied attribute under the supplied name. |
| public Model | addAttribute(Object
the model attribute value (never attributeValue)null)Add the supplied attribute to this |
| public Map | |
| public boolean | Returns: whether this model contains a corresponding attributethe name of the model attribute (never attributeName)null)Does this model contain an attribute of the given name? |
| public Object | Returns: the corresponding attribute value, ornull if nonethe name of the model attribute (never attributeName)null)Return the attribute value for the given name, if any. |
| public Model | mergeAttributes(Map<String, ?> attributes)
Copy all attributes in the supplied |
| addAllAttributes | back to summary |
|---|---|
| public Model addAllAttributes(Collection<?> attributeValues) Copy all attributes in the supplied
| |
| addAllAttributes | back to summary |
|---|---|
| public Model addAllAttributes(Map<String, ?> attributes) Copy all attributes in the supplied
| |
| addAttribute | back to summary |
|---|---|
| public Model addAttribute(String attributeName, Object attributeValue) Add the supplied attribute under the supplied name. | |
| addAttribute | back to summary |
|---|---|
| public Model addAttribute(Object attributeValue) Add the supplied attribute to this Note Empty
| |
| asMap | back to summary |
|---|---|
| public Map Return the current set of model attributes as a Map. | |
| containsAttribute | back to summary |
|---|---|
| public boolean containsAttribute(String attributeName) Does this model contain an attribute of the given name?
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String attributeName) Return the attribute value for the given name, if any. | |
| mergeAttributes | back to summary |
|---|---|
| public Model mergeAttributes(Map<String, ?> attributes) Copy all attributes in the supplied | |