Interface MapWidgetModel<K,V>
- Type Parameters:
K- key typeV- value type
- All Superinterfaces:
WidgetModel
- All Known Implementing Classes:
DefaultMapWidgetModel
A
MapWidgetModel is a WidgetModel holding mapped values.-
Method Summary
Modifier and TypeMethodDescriptionReturns the value associated with the specified key.getMap()Returns the internal map used by this model.booleanAdds the key-value pair to the model.Removes the mapping with the specified key.booleanSets the internal map used by this model.Methods inherited from interface de.hybris.platform.cockpit.widgets.models.WidgetModel
addWidgetModelListener, notifyListeners, removeWidgetModelLlistener
-
Method Details
-
put
Adds the key-value pair to the model. Any previous value associated with the key will be overwritten.- Parameters:
key- mapping keyvalue- mapping value- Returns:
- true if a change was made, false otherwise
-
get
Returns the value associated with the specified key.- Parameters:
key- mapping key- Returns:
- the value associated with the specified key or
nullif no mapping is found
-
getMap
Returns the internal map used by this model.- Returns:
- map containing all the mappings held by this model
-
remove
Removes the mapping with the specified key.- Parameters:
key- the key- Returns:
- the removed value or
nullif no mapping is found
-
setMap
Sets the internal map used by this model.- Parameters:
map- the map- Returns:
- true if a change was made, false otherwise
-