hashmap

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashMap

type HashMap[K MapKey, V any] struct {
	// contains filtered or unexported fields
}

func NewHashMap

func NewHashMap[K MapKey, V any](heap mem.Heap) *HashMap[K, V]

func NewHashMapWithCap

func NewHashMapWithCap[K MapKey, V any](heap mem.Heap, cap int) *HashMap[K, V]

func (*HashMap[K, V]) Clear

func (m *HashMap[K, V]) Clear()

func (*HashMap[K, V]) Del

func (m *HashMap[K, V]) Del(key K)

func (*HashMap[K, V]) For

func (m *HashMap[K, V]) For(fn func(key K, value V) (next bool))

func (*HashMap[K, V]) Free

func (m *HashMap[K, V]) Free()

func (*HashMap[K, V]) Get

func (m *HashMap[K, V]) Get(key K) (V, bool)

func (*HashMap[K, V]) Grow

func (m *HashMap[K, V]) Grow()

func (*HashMap[K, V]) Len

func (m *HashMap[K, V]) Len() int

func (*HashMap[K, V]) MarshalJSON

func (m *HashMap[K, V]) MarshalJSON() ([]byte, error)

func (*HashMap[K, V]) Set

func (m *HashMap[K, V]) Set(key K, value V)

func (*HashMap[K, V]) UnmarshalJSON

func (m *HashMap[K, V]) UnmarshalJSON(data []byte) error

type MapKey

type MapKey interface {
	int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL