Interface MapWidgetModel<K,V>

Type Parameters:
K - key type
V - value type
All Superinterfaces:
WidgetModel
All Known Implementing Classes:
DefaultMapWidgetModel

public interface MapWidgetModel<K,V> extends WidgetModel
A MapWidgetModel is a WidgetModel holding mapped values.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(K key)
    Returns the value associated with the specified key.
    Returns the internal map used by this model.
    boolean
    put(K key, V value)
    Adds the key-value pair to the model.
    remove(K key)
    Removes the mapping with the specified key.
    boolean
    setMap(Map<K,V> map)
    Sets the internal map used by this model.

    Methods inherited from interface de.hybris.platform.cockpit.widgets.models.WidgetModel

    addWidgetModelListener, notifyListeners, removeWidgetModelLlistener
  • Method Details

    • put

      boolean put(K key, V value)
      Adds the key-value pair to the model.

      Any previous value associated with the key will be overwritten.

      Parameters:
      key - mapping key
      value - mapping value
      Returns:
      true if a change was made, false otherwise
    • get

      V get(K key)
      Returns the value associated with the specified key.
      Parameters:
      key - mapping key
      Returns:
      the value associated with the specified key or null if no mapping is found
    • getMap

      Map<K,V> getMap()
      Returns the internal map used by this model.
      Returns:
      map containing all the mappings held by this model
    • remove

      V remove(K key)
      Removes the mapping with the specified key.
      Parameters:
      key - the key
      Returns:
      the removed value or null if no mapping is found
    • setMap

      boolean setMap(Map<K,V> map)
      Sets the internal map used by this model.
      Parameters:
      map - the map
      Returns:
      true if a change was made, false otherwise