_4_self_HashMap

package
v0.0.0-...-a7c7adb Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 4 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
}

哈希表

func NewHashMap

func NewHashMap(capacity int) *HashMap

创建大小为 capacity 的哈希表

func (*HashMap) Capacity

func (m *HashMap) Capacity() int

func (*HashMap) Delete

func (m *HashMap) Delete(key string)

哈希表删除键值对

func (*HashMap) Get

func (m *HashMap) Get(key string) (value interface{}, ok bool)

哈希表获取键值对

func (*HashMap) Len

func (m *HashMap) Len() int

返回哈希表已添加元素数量

func (*HashMap) Put

func (m *HashMap) Put(key string, value interface{})

哈希表添加键值对

func (*HashMap) Range

func (m *HashMap) Range()

哈希表遍历

Jump to

Keyboard shortcuts

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