Adds a pair to the array, assuming it doesn't exist already.
Returns the number of buckets.
Finds the node matching the key.
Returns the value of a key, or null if it doesn't exist.
Finds a node by key or adds a new one if inexistent. Useful when the AA is on the lhs, e.g.: aa["b"] = 1;
Returns the number of nodes.
Prints the contents of this array. Supply own functions for customization.
Allocates a new bucket list and relocates the nodes from the old one.
Removes a key value pair from the array.
Sets the value of a key.
Returns the index of a key in the buckets array.
Prints as hex by default.
Formats a number as a string with hexadecimal characters.
Prints as hex by default.
An associative array implementation which grows by powers of two. Relies on the GC for memory. Does not handle hash collisions. Note: This code is a reference for understanding how hash maps work. It's not meant to be used in DIL. A fast version needs to be implemented which uses dil.Array for custom allocation.