Map
class in package klyn.collections

    public class Map<K, V> extends Object implements MapCollection<K, V>:

Object
└ Map
All Implemented Interfaces: MapCollection

Balanced binary tree map.

Native operator mapping:

- `operator[]` is mapped to the native `klyn_collections_Map_operator_index`.
- `operator==` is mapped to the native `klyn_collections_Map_operator_eq`.
- `operator!=` is mapped to the native `klyn_collections_Map_operator_ne`.

@param <K> Key type. @param <V> Value type.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly native property | size `size as ULong` | Number of entries stored in the map.

Properties inherited from Object: type
Properties inherited from MapCollection: size
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | Map `Map():` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public native | clear `clear() as Void` | Clears all entries.
public native | containsValue `containsValue(value as V) as Boolean` | Returns true if the value exists.
public native | items `items() as IList<Tuple<K, V> >` | Returns the items as a list of tuples.
public native | keys `keys() as IList<K>` | Returns the keys as a list.
public native | remove `remove(key as K) as Boolean` | Removes an entry.
public native override | toString `toString() as String` | Returns a normalized textual representation of map entries.
public native | values `values() as IList<V>` | Returns the values as a list.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from MapCollection: clear, containsValue, items, keys, remove, values
Operators

Modifier and Type | Member | Description
--- | --- | ---
public native | operator in(key as K) as Boolean | Returns true if the key exists.
public native static | operator!=(readonly notnull left as Map, readonly notnull right as Map) as Boolean | Structural inequality between two maps.
public native static | operator==(readonly notnull left as Map, readonly notnull right as Map) as Boolean | Structural equality between two maps.
public native | operator[](key as K) as V | Gets or sets the value associated with the key.

Operators inherited from MapCollection: operator in(key as K) as Boolean, operator[](key as K) as V