TreeMap.put

Adds a new node to the map for key or obtains the existing if already in the map.

struct TreeMap(T)
T*
put
(
ulong key
,
out bool added
)

Parameters

key ulong

the key to add a new node for or obtain the existing one

added bool

outputs true a new node was added or false if key was found in the map so that the existing node is returned

Return Value

Type: T*

the node associated with key. If added is true then it was newly created and added, otherwise it is the already existing node in the tree.

Meta