Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

orderedMap

🌌orderedMap

orderedMap -- an immutable map from ordered keys K to values V

Lookup performance is O(log size) since it uses binary search in a
sorted array. When deterministic performance is desired, an ordered map
should be preferred over a hash map.

performance of creation of the map is in O(n log n) where n is
keys.length.

add mapping from k to v

create a string containing all mappings

redefines map.asString:
create a string containing all mappings

redefines Object.asString:

get the value k is mapped to, or nil if none.

performance is O(log size).

redefines map.index [ ]:
get the value k is mapped to, or nil if none.

get a stream of all key/value pairs in this map

redefines map.items:
get a stream of all key/value pairs in this map

number of entries in this map

redefines map.size:
number of entries in this map