listmap

package
v6.4.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListMap

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

ListMap list 和 map 组合的一个数据结构体

func New

func New() *ListMap

New 创建一个新的数据结构

func (*ListMap) Exist

func (lm *ListMap) Exist(key string) bool

Exist 是否存在这个元素

func (*ListMap) GetItem

func (lm *ListMap) GetItem(key string) (interface{}, error)

GetItem 通过key 获取这个 item

func (*ListMap) GetTop

func (lm *ListMap) GetTop() interface{}

GetTop 获取队列头部的数据

func (*ListMap) Push

func (lm *ListMap) Push(key string, value interface{})

Push 在队伍尾部插入

func (*ListMap) Remove

func (lm *ListMap) Remove(key string) interface{}

Remove 删除某个key

func (*ListMap) Size

func (lm *ListMap) Size() int

Size 结构中的item 数目

func (*ListMap) Walk

func (lm *ListMap) Walk(cb func(value interface{}) bool)

Walk 遍历整个结构,如果cb 返回false 那么停止遍历

Jump to

Keyboard shortcuts

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