IntMap

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntMap

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

IntMap is a specialized version of BucketMap for integers. It avoids all the interface operations.

func New

func New[K comparable, V any](minBucketLen, maxBucketLen byte, maxHash uint, hasher func(K) uint) *IntMap[K, V]

func (*IntMap[K, V]) Delete

func (u *IntMap[K, V]) Delete(key K)

func (*IntMap[K, V]) HasKey

func (u *IntMap[K, V]) HasKey(key K) bool

func (*IntMap[K, V]) Load

func (u *IntMap[K, V]) Load(key K) (V, bool)

func (*IntMap[K, V]) LoadAndDelete

func (u *IntMap[K, V]) LoadAndDelete(key K) (v V, loaded bool)

func (*IntMap[K, V]) LoadOrStore

func (u *IntMap[K, V]) LoadOrStore(key K, val V) (v V, loaded bool)

func (*IntMap[K, V]) LoadPtr

func (u *IntMap[K, V]) LoadPtr(key K) *V

func (*IntMap[K, V]) LoadPtrAndDelete

func (u *IntMap[K, V]) LoadPtrAndDelete(key K) (v *V, loaded bool)

func (*IntMap[K, V]) LoadPtrOrStore

func (u *IntMap[K, V]) LoadPtrOrStore(key K, val V) (v *V, loaded bool)

func (*IntMap[K, V]) Range

func (u *IntMap[K, V]) Range(f func(K, V) bool)

func (*IntMap[K, V]) RangePtr

func (u *IntMap[K, V]) RangePtr(f func(K, *V) bool)

func (*IntMap[K, V]) Set

func (u *IntMap[K, V]) Set(key K, val V) (v *V)

func (*IntMap[K, V]) Size

func (u *IntMap[K, V]) Size() uint

func (*IntMap[K, V]) Store

func (u *IntMap[K, V]) Store(key K, val V)

func (*IntMap[K, V]) Take

func (u *IntMap[K, V]) Take() (key K, val V)

func (*IntMap[K, V]) TakePtr

func (u *IntMap[K, V]) TakePtr() (key K, val *V)

Jump to

Keyboard shortcuts

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