Class JreJsMap<K,​V>

  • Type Parameters:
    K - the key type
    V - the value type

    @Deprecated
    public class JreJsMap<K,​V>
    extends JsMap<K,​V>
    Deprecated.
    Should only be used for testing.
    JRE implementation of JsMap, should only be used for testing.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • JreJsMap

        public JreJsMap()
        Deprecated.
    • Method Detail

      • set

        public JsMap<K,​V> set​(K key,
                                    V value)
        Deprecated.
        Description copied from class: JsMap
        Sets a value in this map, overwriting any previous mapping if present.
        Overrides:
        set in class JsMap<K,​V>
        Parameters:
        key - the key to set
        value - the value to set
        Returns:
        this map, for chaining.
      • get

        public V get​(K key)
        Deprecated.
        Description copied from class: JsMap
        Gets the value mapped for the given key. Returns null if there is no mapping or if the key is explicitly mapped to null.
        Overrides:
        get in class JsMap<K,​V>
        Parameters:
        key - the key to get a value for
        Returns:
        the value corresponding to the given key; or null there is no mapping.
      • has

        public boolean has​(K key)
        Deprecated.
        Description copied from class: JsMap
        Checks whether this map contains a mapping for the given key.
        Overrides:
        has in class JsMap<K,​V>
        Parameters:
        key - the key to check
        Returns:
        true if there is a mapping for the key; false if there is no mapping
      • delete

        public boolean delete​(K key)
        Deprecated.
        Description copied from class: JsMap
        Removes the mapping for a given key.
        Overrides:
        delete in class JsMap<K,​V>
        Parameters:
        key - the key for which to remove the mapping
        Returns:
        true if the map contained a mapping for the given key prior to calling this method; false if no mapping was present
      • clear

        public void clear()
        Deprecated.
        Description copied from class: JsMap
        Removes all mappings from this map.
        Overrides:
        clear in class JsMap<K,​V>
      • forEach

        public void forEach​(JsMap.ForEachCallback<K,​V> callback)
        Deprecated.
        Description copied from class: JsMap
        Invokes the provided callback for each mapping in this map.

        Note that this is the only way of iteration supported in IE11.

        Overrides:
        forEach in class JsMap<K,​V>
        Parameters:
        callback - the callback to invoke for each mapping
      • size

        public int size()
        Deprecated.
        Description copied from class: JsMap
        Gets the number of entries in this map.
        Overrides:
        size in class JsMap<K,​V>
        Returns:
        the entry count