Skip to main content

interface OrderedMapBase<K,V,Tp>

undocumented

Companion namespace: OrderedMapBase

Implemented by: OrderedHashMap<K,V>, OrderedMapBase.NonEmpty<K,V,Tp>, OrderedMap<K,V>, OrderedSortedMap<K,V>, OrderedMapEmpty<K,V,Tp>

Type parameters

NameConstraintsDefaultDescription
Kundocumented
Vundocumented
TpOrderedMapBase.TypesOrderedMapBase.Typesundocumented

Properties

keyOrder

Returns a List instance containing the key order of the Map.

Definition

readonly keyOrder: List<K>;

example
const m = OrderedHashMap.of([2, 'b'], [1, 'a'], [3, 'c'])
console.log(m.keyOrder.toArray())
// => [2, 1, 3]

sourceMap

Returns the contained Map instance.

Definition

readonly sourceMap: WithKeyValue<Tp, K, V>['sourceMap'];

example
const m = OrderedHashMap.of([2, 'b'], [1, 'a'])
console.log(m.sourceMap.toString())
// => HashMap(1 -> 'a', 2 -> 'b')