Home > @thi.ng/associative > HashMapOpts
Creation options for HashMap class.
Signature:
export interface HashMapOpts<K>
Property | Type | Description |
---|---|---|
cap | number |
Initial capacity. Will be rounded up to next power of 2. |
equiv | Predicate2<K> |
Optional key equality predicate. |
hash | HashFn<K> |
Function for computing key hash codes. MUST be supplied. Only numeric hashes are supported. |
load | number |
Normalized max load factor in the open (0..1) interval. The map will be resized (doubled in size) and all existing keys rehashed every time a new key is to be added and the current size exceeds this normalized load. |