hashmap

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHashMap

type BaseHashMap interface {
	Delete(interface{})
	Load(interface{}) (val interface{}, loaded bool)
	LoadAndDelete(interface{}) (val interface{}, exists bool)
	LoadOrStore(interface{}, interface{}) (val interface{}, loaded bool)
	CompareAndSwap(interface{}, interface{}, interface{}) (val interface{}, swapped bool)
	Range(func(interface{}, interface{}) (contd bool))
	Store(interface{}, interface{})
}

type HashMap

type HashMap interface {
	BaseHashMap
	Len() int
}

func NewMap

func NewMap(size int) HashMap

func NewMapWithStringKey

func NewMapWithStringKey(size int) HashMap

type MapCounter

type MapCounter struct {
	BaseHashMap
	// contains filtered or unexported fields
}

func (*MapCounter) Delete

func (m *MapCounter) Delete(key interface{})

func (*MapCounter) Len

func (m *MapCounter) Len() int

func (*MapCounter) LoadAndDelete

func (m *MapCounter) LoadAndDelete(key interface{}) (retVal interface{}, retExists bool)

func (*MapCounter) LoadOrStore

func (m *MapCounter) LoadOrStore(key interface{}, value interface{}) (interface{}, bool)

func (*MapCounter) Store

func (m *MapCounter) Store(key interface{}, val interface{})

Jump to

Keyboard shortcuts

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