hashmap

package
v0.0.0-...-63a9d49 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 3 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() *HashMap

创建一个新的哈希表

func (*HashMap) Delete

func (h *HashMap) Delete(key interface{}) bool

删除哈希表中指定键的键值对

func (*HashMap) Get

func (h *HashMap) Get(key interface{}) (interface{}, bool)

根据键获取哈希表中对应的值

func (*HashMap) Put

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

将键值对添加到哈希表中

func (*HashMap) Size

func (h *HashMap) Size() int

返回哈希表中元素的数量

func (*HashMap) String

func (h *HashMap) String() string

实现fmt.Stringer接口,将哈希表转换为字符串表示形式

Jump to

Keyboard shortcuts

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