K - the key typeV - the value type@JsType(isNative=true)
public interface JsWeakMap<K,V>
JsCollections.weakMap() to create an appropriate instance.| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(K key)
Removes the mapping for a given key.
|
V |
get(K key)
Gets the value mapped for the given key.
|
boolean |
has(K key)
Checks whether this map contains a mapping for the given key.
|
JsWeakMap<K,V> |
set(K key,
V value)
Sets a value in this map, overwriting any previous mapping if present.
|
JsWeakMap<K,V> set(K key, V value)
key - the key to setvalue - the value to setV get(K key)
null if
there is no mapping, if the key is explicitly mapped to null
or if the key has been garbage collected.key - the key to get a value fornull
there is no mapping.boolean has(K key)
key - the key to checktrue if there is a mapping for the key;
false if there is no mappingboolean delete(K key)
key - the key for which to remove the mappingtrue if the map contained a mapping for the given
key prior to calling this method; false if no
mapping was presentCopyright © 2000–2026 Vaadin Ltd. All rights reserved.