hashmap

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

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

Map is a robinhashmap implementation

func New

func New[K comparable, V any](cap int) *Map[K, V]

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(h uint64, k K)

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(h uint64, k K) (*V, bool)

func (*Map[K, V]) Len

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

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(h uint64, k K, v *V) bool

Set sets the value for the given key. return true if the key already exists.

Jump to

Keyboard shortcuts

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