hashmap

package
v1.2.117 Latest Latest
Warning

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

Go to latest
Published: May 13, 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 HashMap

type HashMap struct {
	// contains filtered or unexported fields
}

HashMap is an auto make map

func New

func New() *HashMap

func (*HashMap) Add

func (m *HashMap) Add(key, value any) error

add adds Key to the head of the linked list.

func (*HashMap) AddOrUpdate

func (m *HashMap) AddOrUpdate(key any, value any)

func (*HashMap) AddPair

func (m *HashMap) AddPair(pair Pair) error

func (*HashMap) Clear

func (m *HashMap) Clear()

func (*HashMap) Contains

func (m *HashMap) Contains(key any) bool

func (*HashMap) Count

func (m *HashMap) Count() int

func (*HashMap) Find

func (m *HashMap) Find(key any) (any, bool)

func (*HashMap) Init

func (m *HashMap) Init() *HashMap

Init initializes or clears map m.

func (*HashMap) Keys

func (m *HashMap) Keys() []any

func (*HashMap) Len

func (m *HashMap) Len() int

Len returns the number of items in the cache.

func (*HashMap) Pairs

func (m *HashMap) Pairs() []Pair

func (*HashMap) Peek

func (m *HashMap) Peek(key any) (any, bool)

func (*HashMap) Remove

func (m *HashMap) Remove(key any) any

Remove removes Key from cl.

func (*HashMap) Size

func (m *HashMap) Size() int

func (*HashMap) Values

func (m *HashMap) Values() []any

type Pair

type Pair struct {
	Key   any
	Value any
}

Jump to

Keyboard shortcuts

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