Interface MapWidgetModel<K,​V>

    • Method Detail

      • 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

        java.util.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​(java.util.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