klyn.collections.HashMap.operator[]
method
public native operator[](key as K) as V
Description

Gets or sets the value associated with a key.

Parameters
ParameterDescription
keyThe key to access.
Returns

The associated value.

Throws
  • KeyException if a read targets an absent key.
Example
values = HashMap<String, Int>()
values["answer"] = 42
assert values["answer"] == 42