Class JsCollections
java.lang.Object
com.vaadin.client.flow.collection.JsCollections
Factory for JavaScript collection implementations with support for
alternative JRE implementations.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JsArray<T>array()Creates a new JavaScript Array.static <T> JsArray<T>array(T... values) Creates a new JavaScript Array with the given contents.static <K,V> JsMap<K, V> map()Creates a new JavaScript Map.static <V> JsSet<V>set()Creates a new empty JavaScript Set.static <T> JsSet<T>Creates a new JavaScript Set with the same contents as another set.static <K,V> JsWeakMap<K, V> weakMap()Creates a new JavaScript WeakMap.
-
Method Details
-
array
Creates a new JavaScript Array.- Type Parameters:
T- the array type- Returns:
- a new JS array instance
-
array
Creates a new JavaScript Array with the given contents.- Type Parameters:
T- the array type- Parameters:
values- the values of the new array- Returns:
- a new JS array instance
-
map
Creates a new JavaScript Map.- Type Parameters:
K- the key typeV- the value type- Returns:
- a new JS map instance
-
weakMap
Creates a new JavaScript WeakMap.- Type Parameters:
K- the key typeV- the value type- Returns:
- a new JS weak map instance
-
set
Creates a new empty JavaScript Set.- Type Parameters:
V- the set type- Returns:
- a new empty JS Set instance
-
set
Creates a new JavaScript Set with the same contents as another set.- Type Parameters:
T- the set type- Parameters:
values- a set of values to add to the new set- Returns:
- a new JS Set with the provided contents
-