public class Map<K, V> extends Object implements MapCollection<K, V>:
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.
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly native property | sizesize as ULong |
Number of entries stored in the map. |
| Modifier and Type | Member | Description |
|---|---|---|
| public native | clearclear() as Void |
Clears all entries. |
| public native | containsValuecontainsValue(value as V) as Boolean |
Returns true if the value exists. |
| public native | items | Returns the items as a list of tuples. |
| public native | keyskeys() as IList<K> |
Returns the keys as a list. |
| public native | removeremove(key as K) as Boolean |
Removes an entry. |
| public native override | toStringtoString() as String |
Returns a normalized textual representation of map entries. |
| public native | valuesvalues() as IList<V> |
Returns the values as a list. |
| 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. |