Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap[K comparable, V any] struct { *vector.Vector[map[K]V] maphash.Hash // contains filtered or unexported fields }
HashMap is a hash map data structure, using hash/maphash for key hashing.
func New ¶
func New[K comparable, V any](loadFactor float32, capacity int) *HashMap[K, V]
New constructs a new HashMap
func (*HashMap[K, V]) Collect ¶
Collect inserts a variable number of key-value pairs into the hash map. This method implements part of the iterator.Collection interface.
func (HashMap[K, V]) Get ¶
Get retrieves the value associated with a specified key. Returns nil, errors.NotFound if key does not exist.
type Iterator ¶
type Iterator[K comparable, V any] struct { *HashMap[K, V] }
Click to show internal directories.
Click to hide internal directories.