gf: github.com/johng-cn/gf/g/container/gmap Index | Files

package gmap

import "github.com/johng-cn/gf/g/container/gmap"

并发安全的哈希MAP.

Index

Package Files

gmap.go int_bool_map.go int_int_map.go int_interface_map.go int_string_map.go interface_interface_map.go string_bool_map.go string_int_map.go string_interface_map.go string_string_map.go uint_interface_map.go

type IntBoolMap Uses

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

func NewIntBoolMap Uses

func NewIntBoolMap() *IntBoolMap

func (*IntBoolMap) BatchRemove Uses

func (this *IntBoolMap) BatchRemove(keys []int)

批量删除键值对

func (*IntBoolMap) BatchSet Uses

func (this *IntBoolMap) BatchSet(m map[int]bool)

批量设置键值对

func (*IntBoolMap) Clear Uses

func (this *IntBoolMap) Clear()

清空哈希表

func (*IntBoolMap) Clone Uses

func (this *IntBoolMap) Clone() *map[int]bool

哈希表克隆

func (*IntBoolMap) Contains Uses

func (this *IntBoolMap) Contains(key int) bool

是否存在某个键

func (*IntBoolMap) Get Uses

func (this *IntBoolMap) Get(key int) bool

获取键值

func (*IntBoolMap) GetAndRemove Uses

func (this *IntBoolMap) GetAndRemove(key int) bool

返回对应的键值,并删除该键值

func (*IntBoolMap) GetWithDefault Uses

func (this *IntBoolMap) GetWithDefault(key int, value bool) bool

获取键值,如果键值不存在则写入默认值

func (*IntBoolMap) IsEmpty Uses

func (this *IntBoolMap) IsEmpty() bool

哈希表是否为空

func (*IntBoolMap) Iterator Uses

func (this *IntBoolMap) Iterator(f func(k int, v bool) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*IntBoolMap) Keys Uses

func (this *IntBoolMap) Keys() []int

返回键列表

func (*IntBoolMap) LockFunc Uses

func (this *IntBoolMap) LockFunc(f func(m map[int]bool))

使用自定义方法执行加锁修改操作

func (*IntBoolMap) RLockFunc Uses

func (this *IntBoolMap) RLockFunc(f func(m map[int]bool))

使用自定义方法执行加锁读取操作

func (*IntBoolMap) Remove Uses

func (this *IntBoolMap) Remove(key int)

删除键值对

func (*IntBoolMap) Set Uses

func (this *IntBoolMap) Set(key int, val bool)

设置键值对

func (*IntBoolMap) Size Uses

func (this *IntBoolMap) Size() int

哈希表大小

type IntIntMap Uses

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

func NewIntIntMap Uses

func NewIntIntMap() *IntIntMap

func (*IntIntMap) BatchRemove Uses

func (this *IntIntMap) BatchRemove(keys []int)

批量删除键值对

func (*IntIntMap) BatchSet Uses

func (this *IntIntMap) BatchSet(m map[int]int)

批量设置键值对

func (*IntIntMap) Clear Uses

func (this *IntIntMap) Clear()

清空哈希表

func (*IntIntMap) Clone Uses

func (this *IntIntMap) Clone() *map[int]int

哈希表克隆

func (*IntIntMap) Contains Uses

func (this *IntIntMap) Contains(key int) bool

是否存在某个键

func (*IntIntMap) Get Uses

func (this *IntIntMap) Get(key int) int

获取键值

func (*IntIntMap) GetAndRemove Uses

func (this *IntIntMap) GetAndRemove(key int) int

返回对应的键值,并删除该键值

func (*IntIntMap) GetWithDefault Uses

func (this *IntIntMap) GetWithDefault(key int, value int) int

获取键值,如果键值不存在则写入默认值

func (*IntIntMap) IsEmpty Uses

func (this *IntIntMap) IsEmpty() bool

哈希表是否为空

func (*IntIntMap) Iterator Uses

func (this *IntIntMap) Iterator(f func(k int, v int) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*IntIntMap) Keys Uses

func (this *IntIntMap) Keys() []int

返回键列表

func (*IntIntMap) LockFunc Uses

func (this *IntIntMap) LockFunc(f func(m map[int]int))

使用自定义方法执行加锁修改操作

func (*IntIntMap) RLockFunc Uses

func (this *IntIntMap) RLockFunc(f func(m map[int]int))

使用自定义方法执行加锁读取操作

func (*IntIntMap) Remove Uses

func (this *IntIntMap) Remove(key int)

删除键值对

func (*IntIntMap) Set Uses

func (this *IntIntMap) Set(key int, val int)

设置键值对

func (*IntIntMap) Size Uses

func (this *IntIntMap) Size() int

哈希表大小

func (*IntIntMap) Values Uses

func (this *IntIntMap) Values() []int

返回值列表(注意是随机排序)

type IntInterfaceMap Uses

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

func NewIntInterfaceMap Uses

func NewIntInterfaceMap() *IntInterfaceMap

func (*IntInterfaceMap) BatchRemove Uses

func (this *IntInterfaceMap) BatchRemove(keys []int)

批量删除键值对

func (*IntInterfaceMap) BatchSet Uses

func (this *IntInterfaceMap) BatchSet(m map[int]interface{})

批量设置键值对

func (*IntInterfaceMap) Clear Uses

func (this *IntInterfaceMap) Clear()

清空哈希表

func (*IntInterfaceMap) Clone Uses

func (this *IntInterfaceMap) Clone() *map[int]interface{}

哈希表克隆

func (*IntInterfaceMap) Contains Uses

func (this *IntInterfaceMap) Contains(key int) bool

是否存在某个键

func (*IntInterfaceMap) Get Uses

func (this *IntInterfaceMap) Get(key int) interface{}

获取键值

func (*IntInterfaceMap) GetAndRemove Uses

func (this *IntInterfaceMap) GetAndRemove(key int) interface{}

返回对应的键值,并删除该键值

func (*IntInterfaceMap) GetBool Uses

func (this *IntInterfaceMap) GetBool(key int) bool

func (*IntInterfaceMap) GetFloat32 Uses

func (this *IntInterfaceMap) GetFloat32(key int) float32

func (*IntInterfaceMap) GetFloat64 Uses

func (this *IntInterfaceMap) GetFloat64(key int) float64

func (*IntInterfaceMap) GetInt Uses

func (this *IntInterfaceMap) GetInt(key int) int

func (*IntInterfaceMap) GetString Uses

func (this *IntInterfaceMap) GetString(key int) string

func (*IntInterfaceMap) GetUint Uses

func (this *IntInterfaceMap) GetUint(key int) uint

func (*IntInterfaceMap) GetWithDefault Uses

func (this *IntInterfaceMap) GetWithDefault(key int, value interface{}) interface{}

获取键值,如果键值不存在则写入默认值

func (*IntInterfaceMap) IsEmpty Uses

func (this *IntInterfaceMap) IsEmpty() bool

哈希表是否为空

func (*IntInterfaceMap) Iterator Uses

func (this *IntInterfaceMap) Iterator(f func(k int, v interface{}) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*IntInterfaceMap) Keys Uses

func (this *IntInterfaceMap) Keys() []int

返回键列表

func (*IntInterfaceMap) LockFunc Uses

func (this *IntInterfaceMap) LockFunc(f func(m map[int]interface{}))

使用自定义方法执行加锁修改操作

func (*IntInterfaceMap) RLockFunc Uses

func (this *IntInterfaceMap) RLockFunc(f func(m map[int]interface{}))

使用自定义方法执行加锁读取操作

func (*IntInterfaceMap) Remove Uses

func (this *IntInterfaceMap) Remove(key int)

删除键值对

func (*IntInterfaceMap) Set Uses

func (this *IntInterfaceMap) Set(key int, val interface{})

设置键值对

func (*IntInterfaceMap) Size Uses

func (this *IntInterfaceMap) Size() int

哈希表大小

func (*IntInterfaceMap) Values Uses

func (this *IntInterfaceMap) Values() []interface{}

返回值列表(注意是随机排序)

type IntStringMap Uses

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

func NewIntStringMap Uses

func NewIntStringMap() *IntStringMap

func (*IntStringMap) BatchRemove Uses

func (this *IntStringMap) BatchRemove(keys []int)

批量删除键值对

func (*IntStringMap) BatchSet Uses

func (this *IntStringMap) BatchSet(m map[int]string)

批量设置键值对

func (*IntStringMap) Clear Uses

func (this *IntStringMap) Clear()

清空哈希表

func (*IntStringMap) Clone Uses

func (this *IntStringMap) Clone() *map[int]string

哈希表克隆

func (*IntStringMap) Contains Uses

func (this *IntStringMap) Contains(key int) bool

是否存在某个键

func (*IntStringMap) Get Uses

func (this *IntStringMap) Get(key int) string

获取键值

func (*IntStringMap) GetAndRemove Uses

func (this *IntStringMap) GetAndRemove(key int) string

返回对应的键值,并删除该键值

func (*IntStringMap) GetWithDefault Uses

func (this *IntStringMap) GetWithDefault(key int, value string) string

获取键值,如果键值不存在则写入默认值

func (*IntStringMap) IsEmpty Uses

func (this *IntStringMap) IsEmpty() bool

哈希表是否为空

func (*IntStringMap) Iterator Uses

func (this *IntStringMap) Iterator(f func(k int, v string) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*IntStringMap) Keys Uses

func (this *IntStringMap) Keys() []int

返回键列表

func (*IntStringMap) LockFunc Uses

func (this *IntStringMap) LockFunc(f func(m map[int]string))

使用自定义方法执行加锁修改操作

func (*IntStringMap) RLockFunc Uses

func (this *IntStringMap) RLockFunc(f func(m map[int]string))

使用自定义方法执行加锁读取操作

func (*IntStringMap) Remove Uses

func (this *IntStringMap) Remove(key int)

删除键值对

func (*IntStringMap) Set Uses

func (this *IntStringMap) Set(key int, val string)

设置键值对

func (*IntStringMap) Size Uses

func (this *IntStringMap) Size() int

哈希表大小

func (*IntStringMap) Values Uses

func (this *IntStringMap) Values() []string

返回值列表(注意是随机排序)

type InterfaceInterfaceMap Uses

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

func NewInterfaceInterfaceMap Uses

func NewInterfaceInterfaceMap() *InterfaceInterfaceMap

func (*InterfaceInterfaceMap) BatchRemove Uses

func (this *InterfaceInterfaceMap) BatchRemove(keys []interface{})

批量删除键值对

func (*InterfaceInterfaceMap) BatchSet Uses

func (this *InterfaceInterfaceMap) BatchSet(m map[interface{}]interface{})

批量设置键值对

func (*InterfaceInterfaceMap) Clear Uses

func (this *InterfaceInterfaceMap) Clear()

清空哈希表

func (*InterfaceInterfaceMap) Clone Uses

func (this *InterfaceInterfaceMap) Clone() *map[interface{}]interface{}

哈希表克隆

func (*InterfaceInterfaceMap) Contains Uses

func (this *InterfaceInterfaceMap) Contains(key interface{}) bool

是否存在某个键

func (*InterfaceInterfaceMap) Get Uses

func (this *InterfaceInterfaceMap) Get(key interface{}) interface{}

获取键值

func (*InterfaceInterfaceMap) GetAndRemove Uses

func (this *InterfaceInterfaceMap) GetAndRemove(key interface{}) interface{}

返回对应的键值,并删除该键值

func (*InterfaceInterfaceMap) GetBool Uses

func (this *InterfaceInterfaceMap) GetBool(key interface{}) bool

func (*InterfaceInterfaceMap) GetFloat32 Uses

func (this *InterfaceInterfaceMap) GetFloat32(key interface{}) float32

func (*InterfaceInterfaceMap) GetFloat64 Uses

func (this *InterfaceInterfaceMap) GetFloat64(key interface{}) float64

func (*InterfaceInterfaceMap) GetInt Uses

func (this *InterfaceInterfaceMap) GetInt(key interface{}) int

func (*InterfaceInterfaceMap) GetString Uses

func (this *InterfaceInterfaceMap) GetString(key interface{}) string

func (*InterfaceInterfaceMap) GetUint Uses

func (this *InterfaceInterfaceMap) GetUint(key interface{}) uint

func (*InterfaceInterfaceMap) GetWithDefault Uses

func (this *InterfaceInterfaceMap) GetWithDefault(key interface{}, value interface{}) interface{}

获取键值,如果键值不存在则写入默认值

func (*InterfaceInterfaceMap) IsEmpty Uses

func (this *InterfaceInterfaceMap) IsEmpty() bool

哈希表是否为空

func (*InterfaceInterfaceMap) Iterator Uses

func (this *InterfaceInterfaceMap) Iterator(f func(k interface{}, v interface{}) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*InterfaceInterfaceMap) Keys Uses

func (this *InterfaceInterfaceMap) Keys() []interface{}

返回键列表

func (*InterfaceInterfaceMap) LockFunc Uses

func (this *InterfaceInterfaceMap) LockFunc(f func(m map[interface{}]interface{}))

使用自定义方法执行加锁修改操作

func (*InterfaceInterfaceMap) RLockFunc Uses

func (this *InterfaceInterfaceMap) RLockFunc(f func(m map[interface{}]interface{}))

使用自定义方法执行加锁读取操作

func (*InterfaceInterfaceMap) Remove Uses

func (this *InterfaceInterfaceMap) Remove(key interface{})

删除键值对

func (*InterfaceInterfaceMap) Set Uses

func (this *InterfaceInterfaceMap) Set(key interface{}, val interface{})

设置键值对

func (*InterfaceInterfaceMap) Size Uses

func (this *InterfaceInterfaceMap) Size() int

哈希表大小

func (*InterfaceInterfaceMap) Values Uses

func (this *InterfaceInterfaceMap) Values() []interface{}

返回值列表(注意是随机排序)

type StringBoolMap Uses

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

func NewStringBoolMap Uses

func NewStringBoolMap() *StringBoolMap

func (*StringBoolMap) BatchRemove Uses

func (this *StringBoolMap) BatchRemove(keys []string)

批量删除键值对

func (*StringBoolMap) BatchSet Uses

func (this *StringBoolMap) BatchSet(m map[string]bool)

批量设置键值对

func (*StringBoolMap) Clear Uses

func (this *StringBoolMap) Clear()

清空哈希表

func (*StringBoolMap) Clone Uses

func (this *StringBoolMap) Clone() *map[string]bool

哈希表克隆

func (*StringBoolMap) Contains Uses

func (this *StringBoolMap) Contains(key string) bool

是否存在某个键

func (*StringBoolMap) Get Uses

func (this *StringBoolMap) Get(key string) bool

获取键值

func (*StringBoolMap) GetAndRemove Uses

func (this *StringBoolMap) GetAndRemove(key string) bool

返回对应的键值,并删除该键值

func (*StringBoolMap) GetWithDefault Uses

func (this *StringBoolMap) GetWithDefault(key string, value bool) bool

获取键值,如果键值不存在则写入默认值

func (*StringBoolMap) IsEmpty Uses

func (this *StringBoolMap) IsEmpty() bool

哈希表是否为空

func (*StringBoolMap) Iterator Uses

func (this *StringBoolMap) Iterator(f func(k string, v bool) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*StringBoolMap) Keys Uses

func (this *StringBoolMap) Keys() []string

返回键列表

func (*StringBoolMap) LockFunc Uses

func (this *StringBoolMap) LockFunc(f func(m map[string]bool))

使用自定义方法执行加锁修改操作

func (*StringBoolMap) RLockFunc Uses

func (this *StringBoolMap) RLockFunc(f func(m map[string]bool))

使用自定义方法执行加锁读取操作

func (*StringBoolMap) Remove Uses

func (this *StringBoolMap) Remove(key string)

删除键值对

func (*StringBoolMap) Set Uses

func (this *StringBoolMap) Set(key string, val bool)

设置键值对

func (*StringBoolMap) Size Uses

func (this *StringBoolMap) Size() int

哈希表大小

type StringIntMap Uses

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

func NewStringIntMap Uses

func NewStringIntMap() *StringIntMap

func (*StringIntMap) BatchRemove Uses

func (this *StringIntMap) BatchRemove(keys []string)

批量删除键值对

func (*StringIntMap) BatchSet Uses

func (this *StringIntMap) BatchSet(m map[string]int)

批量设置键值对

func (*StringIntMap) Clear Uses

func (this *StringIntMap) Clear()

清空哈希表

func (*StringIntMap) Clone Uses

func (this *StringIntMap) Clone() *map[string]int

哈希表克隆

func (*StringIntMap) Contains Uses

func (this *StringIntMap) Contains(key string) bool

是否存在某个键

func (*StringIntMap) Get Uses

func (this *StringIntMap) Get(key string) int

获取键值

func (*StringIntMap) GetAndRemove Uses

func (this *StringIntMap) GetAndRemove(key string) int

返回对应的键值,并删除该键值

func (*StringIntMap) GetWithDefault Uses

func (this *StringIntMap) GetWithDefault(key string, value int) int

获取键值,如果键值不存在则写入默认值

func (*StringIntMap) IsEmpty Uses

func (this *StringIntMap) IsEmpty() bool

哈希表是否为空

func (*StringIntMap) Iterator Uses

func (this *StringIntMap) Iterator(f func(k string, v int) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*StringIntMap) Keys Uses

func (this *StringIntMap) Keys() []string

返回键列表

func (*StringIntMap) LockFunc Uses

func (this *StringIntMap) LockFunc(f func(m map[string]int))

使用自定义方法执行加锁修改操作

func (*StringIntMap) RLockFunc Uses

func (this *StringIntMap) RLockFunc(f func(m map[string]int))

使用自定义方法执行加锁读取操作

func (*StringIntMap) Remove Uses

func (this *StringIntMap) Remove(key string)

删除键值对

func (*StringIntMap) Set Uses

func (this *StringIntMap) Set(key string, val int)

设置键值对

func (*StringIntMap) Size Uses

func (this *StringIntMap) Size() int

哈希表大小

func (*StringIntMap) Values Uses

func (this *StringIntMap) Values() []int

返回值列表(注意是随机排序)

type StringInterfaceMap Uses

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

func NewStringInterfaceMap Uses

func NewStringInterfaceMap() *StringInterfaceMap

func (*StringInterfaceMap) BatchRemove Uses

func (this *StringInterfaceMap) BatchRemove(keys []string)

批量删除键值对

func (*StringInterfaceMap) BatchSet Uses

func (this *StringInterfaceMap) BatchSet(m map[string]interface{})

批量设置键值对

func (*StringInterfaceMap) Clear Uses

func (this *StringInterfaceMap) Clear()

清空哈希表

func (*StringInterfaceMap) Clone Uses

func (this *StringInterfaceMap) Clone() *map[string]interface{}

哈希表克隆

func (*StringInterfaceMap) Contains Uses

func (this *StringInterfaceMap) Contains(key string) bool

是否存在某个键

func (*StringInterfaceMap) Get Uses

func (this *StringInterfaceMap) Get(key string) interface{}

获取键值

func (*StringInterfaceMap) GetAndRemove Uses

func (this *StringInterfaceMap) GetAndRemove(key string) interface{}

返回对应的键值,并删除该键值

func (*StringInterfaceMap) GetBool Uses

func (this *StringInterfaceMap) GetBool(key string) bool

func (*StringInterfaceMap) GetFloat32 Uses

func (this *StringInterfaceMap) GetFloat32(key string) float32

func (*StringInterfaceMap) GetFloat64 Uses

func (this *StringInterfaceMap) GetFloat64(key string) float64

func (*StringInterfaceMap) GetInt Uses

func (this *StringInterfaceMap) GetInt(key string) int

func (*StringInterfaceMap) GetString Uses

func (this *StringInterfaceMap) GetString(key string) string

func (*StringInterfaceMap) GetUint Uses

func (this *StringInterfaceMap) GetUint(key string) uint

func (*StringInterfaceMap) GetWithDefault Uses

func (this *StringInterfaceMap) GetWithDefault(key string, value interface{}) interface{}

获取键值,如果键值不存在则写入默认值

func (*StringInterfaceMap) IsEmpty Uses

func (this *StringInterfaceMap) IsEmpty() bool

哈希表是否为空

func (*StringInterfaceMap) Iterator Uses

func (this *StringInterfaceMap) Iterator(f func(k string, v interface{}) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*StringInterfaceMap) Keys Uses

func (this *StringInterfaceMap) Keys() []string

返回键列表

func (*StringInterfaceMap) LockFunc Uses

func (this *StringInterfaceMap) LockFunc(f func(m map[string]interface{}))

使用自定义方法执行加锁修改操作

func (*StringInterfaceMap) RLockFunc Uses

func (this *StringInterfaceMap) RLockFunc(f func(m map[string]interface{}))

使用自定义方法执行加锁读取操作

func (*StringInterfaceMap) Remove Uses

func (this *StringInterfaceMap) Remove(key string)

删除键值对

func (*StringInterfaceMap) Set Uses

func (this *StringInterfaceMap) Set(key string, val interface{})

设置键值对

func (*StringInterfaceMap) Size Uses

func (this *StringInterfaceMap) Size() int

哈希表大小

func (*StringInterfaceMap) Values Uses

func (this *StringInterfaceMap) Values() []interface{}

返回值列表(注意是随机排序)

type StringStringMap Uses

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

func NewStringStringMap Uses

func NewStringStringMap() *StringStringMap

func (*StringStringMap) BatchRemove Uses

func (this *StringStringMap) BatchRemove(keys []string)

批量删除键值对

func (*StringStringMap) BatchSet Uses

func (this *StringStringMap) BatchSet(m map[string]string)

批量设置键值对

func (*StringStringMap) Clear Uses

func (this *StringStringMap) Clear()

清空哈希表

func (*StringStringMap) Clone Uses

func (this *StringStringMap) Clone() *map[string]string

哈希表克隆

func (*StringStringMap) Contains Uses

func (this *StringStringMap) Contains(key string) bool

是否存在某个键

func (*StringStringMap) Get Uses

func (this *StringStringMap) Get(key string) string

获取键值

func (*StringStringMap) GetAndRemove Uses

func (this *StringStringMap) GetAndRemove(key string) string

返回对应的键值,并删除该键值

func (*StringStringMap) GetWithDefault Uses

func (this *StringStringMap) GetWithDefault(key string, value string) string

获取键值,如果键值不存在则写入默认值

func (*StringStringMap) IsEmpty Uses

func (this *StringStringMap) IsEmpty() bool

哈希表是否为空

func (*StringStringMap) Iterator Uses

func (this *StringStringMap) Iterator(f func(k string, v string) bool)

给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历

func (*StringStringMap) Keys Uses

func (this *StringStringMap) Keys() []string

返回键列表

func (*StringStringMap) LockFunc Uses

func (this *StringStringMap) LockFunc(f func(m map[string]string))

使用自定义方法执行加锁修改操作

func (*StringStringMap) RLockFunc Uses

func (this *StringStringMap) RLockFunc(f func(m map[string]string))

使用自定义方法执行加锁读取操作

func (*StringStringMap) Remove Uses

func (this *StringStringMap) Remove(key string)

删除键值对

func (*StringStringMap) Set Uses

func (this *StringStringMap) Set(key string, val string)

设置键值对

func (*StringStringMap) Size Uses

func (this *StringStringMap) Size() int

哈希表大小

func (*StringStringMap) Values Uses

func (this *StringStringMap) Values() []string

返回值列表(注意是随机排序)

type UintInterfaceMap Uses

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

func NewUintInterfaceMap Uses

func NewUintInterfaceMap() *UintInterfaceMap

func (*UintInterfaceMap) BatchRemove Uses

func (this *UintInterfaceMap) BatchRemove(keys []uint)

批量删除键值对

func (*UintInterfaceMap) BatchSet Uses

func (this *UintInterfaceMap) BatchSet(m map[uint]interface{})

批量设置键值对

func (*UintInterfaceMap) Clear Uses

func (this *UintInterfaceMap) Clear()

清空哈希表

func (*UintInterfaceMap) Clone Uses

func (this *UintInterfaceMap) Clone() *map[uint]interface{}

哈希表克隆

func (*UintInterfaceMap) Contains Uses

func (this *UintInterfaceMap) Contains(key uint) bool

是否存在某个键

func (*UintInterfaceMap) Get Uses

func (this *UintInterfaceMap) Get(key uint) interface{}

获取键值

func (*UintInterfaceMap) GetAndRemove Uses

func (this *UintInterfaceMap) GetAndRemove(key uint) interface{}

返回对应的键值,并删除该键值

func (*UintInterfaceMap) GetBool Uses

func (this *UintInterfaceMap) GetBool(key uint) bool

func (*UintInterfaceMap) GetFloat32 Uses

func (this *UintInterfaceMap) GetFloat32(key uint) float32

func (*UintInterfaceMap) GetFloat64 Uses

func (this *UintInterfaceMap) GetFloat64(key uint) float64

func (*UintInterfaceMap) GetInt Uses

func (this *UintInterfaceMap) GetInt(key uint) int

func (*UintInterfaceMap) GetString Uses

func (this *UintInterfaceMap) GetString(key uint) string

func (*UintInterfaceMap) GetUint Uses

func (this *UintInterfaceMap) GetUint(key uint) uint

func (*UintInterfaceMap) GetWithDefault Uses

func (this *UintInterfaceMap) GetWithDefault(key uint, value interface{}) interface{}

获取键值,如果键值不存在则写入默认值

func (*UintInterfaceMap) IsEmpty Uses

func (this *UintInterfaceMap) IsEmpty() bool

哈希表是否为空

func (*UintInterfaceMap) Iterator Uses

func (this *UintInterfaceMap) Iterator(f func(k uint, v interface{}) bool)

func (*UintInterfaceMap) Keys Uses

func (this *UintInterfaceMap) Keys() []uint

返回键列表

func (*UintInterfaceMap) LockFunc Uses

func (this *UintInterfaceMap) LockFunc(f func(m map[uint]interface{}))

使用自定义方法执行加锁修改操作

func (*UintInterfaceMap) RLockFunc Uses

func (this *UintInterfaceMap) RLockFunc(f func(m map[uint]interface{}))

使用自定义方法执行加锁读取操作

func (*UintInterfaceMap) Remove Uses

func (this *UintInterfaceMap) Remove(key uint)

删除键值对

func (*UintInterfaceMap) Set Uses

func (this *UintInterfaceMap) Set(key uint, val interface{})

设置键值对

func (*UintInterfaceMap) Size Uses

func (this *UintInterfaceMap) Size() int

哈希表大小

func (*UintInterfaceMap) Values Uses

func (this *UintInterfaceMap) Values() []interface{}

返回值列表(注意是随机排序)

Package gmap imports 2 packages (graph). Updated 2018-04-16. Refresh now. Tools for package owners.