Class JreJsWeakMap<K,​V>

  • Type Parameters:
    K - the key type
    V - the value type
    All Implemented Interfaces:
    JsWeakMap<K,​V>

    @Deprecated
    public class JreJsWeakMap<K,​V>
    extends Object
    implements JsWeakMap<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

      • JreJsWeakMap

        public JreJsWeakMap()
        Deprecated.
    • Method Detail

      • set

        public JsWeakMap<K,​V> set​(K key,
                                        V value)
        Deprecated.
        Description copied from interface: JsWeakMap
        Sets a value in this map, overwriting any previous mapping if present.
        Specified by:
        set in interface JsWeakMap<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 interface: JsWeakMap
        Gets the value mapped for the given key. Returns null if there is no mapping, if the key is explicitly mapped to null or if the key has been garbage collected.
        Specified by:
        get in interface JsWeakMap<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 interface: JsWeakMap
        Checks whether this map contains a mapping for the given key.
        Specified by:
        has in interface JsWeakMap<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 interface: JsWeakMap
        Removes the mapping for a given key.
        Specified by:
        delete in interface JsWeakMap<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