Class DefaultMapWidgetModel<K,V>
- java.lang.Object
-
- de.hybris.platform.cockpit.widgets.models.impl.AbstractWidgetModel
-
- de.hybris.platform.cockpit.widgets.models.impl.DefaultMapWidgetModel<K,V>
-
- All Implemented Interfaces:
MapWidgetModel<K,V>,WidgetModel
public class DefaultMapWidgetModel<K,V> extends AbstractWidgetModel implements MapWidgetModel<K,V>
-
-
Constructor Summary
Constructors Constructor Description DefaultMapWidgetModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(K key)Returns the value associated with the specified key.java.util.Map<K,V>getMap()Returns the internal map used by this model.booleanput(K key, V value)Adds the key-value pair to the model.Vremove(K key)Removes the mapping with the specified key.booleansetMap(java.util.Map<K,V> map)Sets the internal map used by this model.-
Methods inherited from class de.hybris.platform.cockpit.widgets.models.impl.AbstractWidgetModel
addWidgetModelListener, getWidgetModelListeners, notifyListeners, notifyListeners, removeWidgetModelLlistener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cockpit.widgets.models.WidgetModel
addWidgetModelListener, notifyListeners, removeWidgetModelLlistener
-
-
-
-
Method Detail
-
get
public V get(K key)
Description copied from interface:MapWidgetModelReturns the value associated with the specified key.- Specified by:
getin interfaceMapWidgetModel<K,V>- Parameters:
key- mapping key- Returns:
- the value associated with the specified key or
nullif no mapping is found
-
put
public boolean put(K key, V value)
Description copied from interface:MapWidgetModelAdds the key-value pair to the model. Any previous value associated with the key will be overwritten.- Specified by:
putin interfaceMapWidgetModel<K,V>- Parameters:
key- mapping keyvalue- mapping value- Returns:
- true if a change was made, false otherwise
-
setMap
public boolean setMap(java.util.Map<K,V> map)
Description copied from interface:MapWidgetModelSets the internal map used by this model.- Specified by:
setMapin interfaceMapWidgetModel<K,V>- Parameters:
map- the map- Returns:
- true if a change was made, false otherwise
-
getMap
public java.util.Map<K,V> getMap()
Description copied from interface:MapWidgetModelReturns the internal map used by this model.- Specified by:
getMapin interfaceMapWidgetModel<K,V>- Returns:
- map containing all the mappings held by this model
-
remove
public V remove(K key)
Description copied from interface:MapWidgetModelRemoves the mapping with the specified key.- Specified by:
removein interfaceMapWidgetModel<K,V>- Parameters:
key- the key- Returns:
- the removed value or
nullif no mapping is found
-
-