Class JreJsMap<K,V>

java.lang.Object
com.vaadin.client.flow.collection.JsMap<K,V>
com.vaadin.client.flow.collection.jre.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
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.client.flow.collection.JsMap

    JsMap.ForEachCallback<K,V>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Removes all mappings from this map.
    boolean
    delete(K key)
    Deprecated.
    Removes the mapping for a given key.
    void
    Deprecated.
    Invokes the provided callback for each mapping in this map.
    get(K key)
    Deprecated.
    Gets the value mapped for the given key.
    boolean
    has(K key)
    Deprecated.
    Checks whether this map contains a mapping for the given key.
    set(K key, V value)
    Deprecated.
    Sets a value in this map, overwriting any previous mapping if present.
    int
    Deprecated.
    Gets the number of entries in this map.

    Methods inherited from class com.vaadin.client.flow.collection.JsMap

    isEmpty, mapValues

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JreJsMap

      public JreJsMap()
      Deprecated.
  • Method Details

    • 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