umap

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DEFAULT_SAFE_MAP_MAX_HASH_NUM = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Map) ClearMap

func (m *Map) ClearMap()

func (*Map) Del

func (m *Map) Del(key interface{})

func (*Map) Get

func (m *Map) Get(key interface{}) interface{}

func (*Map) Len

func (m *Map) Len() int

func (*Map) LockRange

func (m *Map) LockRange(f func(key interface{}, value interface{}))

func (*Map) RLockRange

func (m *Map) RLockRange(f func(key interface{}, value interface{}))

func (*Map) Set

func (m *Map) Set(key interface{}, value interface{})

func (*Map) TestAndSet

func (m *Map) TestAndSet(key interface{}, value interface{}) interface{}

func (*Map) UnsafeDel

func (m *Map) UnsafeDel(key interface{})

func (*Map) UnsafeGet

func (m *Map) UnsafeGet(key interface{}) interface{}

func (*Map) UnsafeLen

func (m *Map) UnsafeLen() int

func (*Map) UnsafeRange

func (m *Map) UnsafeRange(f func(key interface{}, value interface{}))

func (*Map) UnsafeSet

func (m *Map) UnsafeSet(key interface{}, value interface{})

type MapEx

type MapEx struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMapEx

func NewMapEx() *MapEx

func (*MapEx) ClearMap

func (m *MapEx) ClearMap()

func (*MapEx) Del

func (m *MapEx) Del(key interface{})

func (*MapEx) Get

func (m *MapEx) Get(key interface{}) interface{}

func (*MapEx) GetArrayIdByKey

func (m *MapEx) GetArrayIdByKey(key interface{}) int

func (*MapEx) GetHashCode

func (m *MapEx) GetHashCode(key interface{}) int

func (*MapEx) GetMapByKey

func (m *MapEx) GetMapByKey(key interface{}) map[interface{}]interface{}

func (*MapEx) Init

func (m *MapEx) Init(hashMapNum int)

func (*MapEx) Len

func (m *MapEx) Len() int

func (*MapEx) LockGet

func (m *MapEx) LockGet(key interface{}, f func(value interface{}))

func (*MapEx) LockRange

func (m *MapEx) LockRange(f func(key interface{}, value interface{}))

func (*MapEx) LockSet

func (m *MapEx) LockSet(key interface{}, f func(value interface{}) interface{})

func (*MapEx) NextRLockRange

func (m *MapEx) NextRLockRange(f func(key interface{}, value interface{}))

func (*MapEx) RLockRange

func (m *MapEx) RLockRange(f func(key interface{}, value interface{}))

func (*MapEx) Set

func (m *MapEx) Set(key interface{}, value interface{})

func (*MapEx) UnsafeDel

func (m *MapEx) UnsafeDel(key interface{})

func (*MapEx) UnsafeGet

func (m *MapEx) UnsafeGet(key interface{}) interface{}

Jump to

Keyboard shortcuts

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