Factory

Immutable map factory.

Functions

Link copied to clipboard
open override fun <K : Any, V> copyOf(map: Map<K, V>): JsMap<K, V>

Return a generic immutable JsMap instance, which is a copy of the provided map.

Link copied to clipboard
open override fun <K : Any, V> empty(): JsMap<K, V>

Return an empty and immutable JS map instance.

fun <K : Any, V> empty(size: Int): JsMap<K, V>

Return an empty JS map instance, pre-sized to the provided size.

Link copied to clipboard
open override fun <K : Any, V> from(entries: Collection<MapLike.Entry<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided sized collection of entries, each an instance of a JS MapLike.Entry of type K and V.

Link copied to clipboard
open override fun <K : Any, V> fromEntries(entries: Collection<Map.Entry<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided sized collection of entries, each an instance of a normal Java Map.Entry of type K and V.

Link copied to clipboard
open override fun <K : Any, V> fromPairs(pairs: Collection<Pair<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided set of pairs, each an instance of Pair of type K and V.

Link copied to clipboard
open override fun <K : Any, V> of(map: MutableMap<K, V>): JsMap<K, V>

Return a generic immutable JsMap instance, which wraps the provided map.

Link copied to clipboard
open override fun <K : Any, V> unbounded(entries: Iterable<MapLike.Entry<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided set of entries, each an instance of a JS MapLike.Entry of type K and V.

Link copied to clipboard
open override fun <K : Any, V> unboundedEntries(entries: Iterable<Map.Entry<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided set of entries, each an instance of a normal Java Map.Entry of type K and V.

Link copied to clipboard
open override fun <K : Any, V> unboundedPairs(pairs: Iterable<Pair<K, V>>): JsMap<K, V>

Return a generic immutable JsMap instance, created from the provided set of pairs, each an instance of Pair of type K and V.