genmap

package
v0.0.0-...-af5906d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenMap

type GenMap[K comparable, V any] map[K]V

func From

func From[K comparable, V any](m map[K]V) GenMap[K, V]

func New

func New[K comparable, V any]() GenMap[K, V]

func (GenMap[K, V]) Clear

func (m GenMap[K, V]) Clear() GenMap[K, V]

func (GenMap[K, V]) Clone

func (m GenMap[K, V]) Clone() GenMap[K, V]

deep copy

func (GenMap[K, V]) CopyFrom

func (m GenMap[K, V]) CopyFrom(src GenMap[K, V]) GenMap[K, V]

func (GenMap[K, V]) CopyFromRaw

func (m GenMap[K, V]) CopyFromRaw(src map[K]V) GenMap[K, V]

func (GenMap[K, V]) CopyTo

func (m GenMap[K, V]) CopyTo(dst GenMap[K, V]) GenMap[K, V]

func (GenMap[K, V]) CopyToRaw

func (m GenMap[K, V]) CopyToRaw(dst map[K]V) GenMap[K, V]

func (GenMap[K, V]) Delete

func (m GenMap[K, V]) Delete(k K) GenMap[K, V]

func (GenMap[K, V]) DeleteFunc

func (m GenMap[K, V]) DeleteFunc(f func(k K, v V) bool)

func (GenMap[K, V]) EqualFunc

func (m GenMap[K, V]) EqualFunc(m2 GenMap[K, V], eq func(V, V) bool) bool

func (GenMap[K, V]) Keys

func (m GenMap[K, V]) Keys() []K

func (GenMap[K, V]) Len

func (m GenMap[K, V]) Len() int

func (GenMap[K, V]) Load

func (m GenMap[K, V]) Load(k K) (v V, ok bool)

func (GenMap[K, V]) LoadAndDelete

func (m GenMap[K, V]) LoadAndDelete(k K) (v V, loaded bool)

func (GenMap[K, V]) LoadAndStore

func (m GenMap[K, V]) LoadAndStore(k K, v V) (actual V, loaded bool)

func (GenMap[K, V]) LoadOrStore

func (m GenMap[K, V]) LoadOrStore(k K, v V) (actual V, loaded bool)

func (GenMap[K, V]) LoadOrStoreFunc

func (m GenMap[K, V]) LoadOrStoreFunc(k K, newFunc func() V) (actual V, loaded bool)

func (GenMap[K, V]) Map

func (m GenMap[K, V]) Map() map[K]V

shallow copy

func (GenMap[K, V]) Range

func (m GenMap[K, V]) Range(f func(k K, v V) (Continue bool)) (RangeAll bool)

func (GenMap[K, V]) Store

func (m GenMap[K, V]) Store(k K, v V) GenMap[K, V]

func (GenMap[K, V]) Values

func (m GenMap[K, V]) Values() []V

Jump to

Keyboard shortcuts

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