Documentation ¶
Overview ¶
并发安全的哈希MAP.
Index ¶
- type IntBoolMap
- func (this *IntBoolMap) BatchRemove(keys []int)
- func (this *IntBoolMap) BatchSet(m map[int]bool)
- func (this *IntBoolMap) Clear()
- func (this *IntBoolMap) Clone() *map[int]bool
- func (this *IntBoolMap) Contains(key int) bool
- func (this *IntBoolMap) Get(key int) bool
- func (this *IntBoolMap) GetAndRemove(key int) bool
- func (this *IntBoolMap) GetWithDefault(key int, value bool) bool
- func (this *IntBoolMap) IsEmpty() bool
- func (this *IntBoolMap) Iterator(f func(k int, v bool) bool)
- func (this *IntBoolMap) Keys() []int
- func (this *IntBoolMap) LockFunc(f func(m map[int]bool))
- func (this *IntBoolMap) RLockFunc(f func(m map[int]bool))
- func (this *IntBoolMap) Remove(key int)
- func (this *IntBoolMap) Set(key int, val bool)
- func (this *IntBoolMap) Size() int
- type IntIntMap
- func (this *IntIntMap) BatchRemove(keys []int)
- func (this *IntIntMap) BatchSet(m map[int]int)
- func (this *IntIntMap) Clear()
- func (this *IntIntMap) Clone() *map[int]int
- func (this *IntIntMap) Contains(key int) bool
- func (this *IntIntMap) Get(key int) int
- func (this *IntIntMap) GetAndRemove(key int) int
- func (this *IntIntMap) GetWithDefault(key int, value int) int
- func (this *IntIntMap) IsEmpty() bool
- func (this *IntIntMap) Iterator(f func(k int, v int) bool)
- func (this *IntIntMap) Keys() []int
- func (this *IntIntMap) LockFunc(f func(m map[int]int))
- func (this *IntIntMap) RLockFunc(f func(m map[int]int))
- func (this *IntIntMap) Remove(key int)
- func (this *IntIntMap) Set(key int, val int)
- func (this *IntIntMap) Size() int
- func (this *IntIntMap) Values() []int
- type IntInterfaceMap
- func (this *IntInterfaceMap) BatchRemove(keys []int)
- func (this *IntInterfaceMap) BatchSet(m map[int]interface{})
- func (this *IntInterfaceMap) Clear()
- func (this *IntInterfaceMap) Clone() *map[int]interface{}
- func (this *IntInterfaceMap) Contains(key int) bool
- func (this *IntInterfaceMap) Get(key int) interface{}
- func (this *IntInterfaceMap) GetAndRemove(key int) interface{}
- func (this *IntInterfaceMap) GetBool(key int) bool
- func (this *IntInterfaceMap) GetFloat32(key int) float32
- func (this *IntInterfaceMap) GetFloat64(key int) float64
- func (this *IntInterfaceMap) GetInt(key int) int
- func (this *IntInterfaceMap) GetString(key int) string
- func (this *IntInterfaceMap) GetUint(key int) uint
- func (this *IntInterfaceMap) GetWithDefault(key int, value interface{}) interface{}
- func (this *IntInterfaceMap) IsEmpty() bool
- func (this *IntInterfaceMap) Iterator(f func(k int, v interface{}) bool)
- func (this *IntInterfaceMap) Keys() []int
- func (this *IntInterfaceMap) LockFunc(f func(m map[int]interface{}))
- func (this *IntInterfaceMap) RLockFunc(f func(m map[int]interface{}))
- func (this *IntInterfaceMap) Remove(key int)
- func (this *IntInterfaceMap) Set(key int, val interface{})
- func (this *IntInterfaceMap) Size() int
- func (this *IntInterfaceMap) Values() []interface{}
- type IntStringMap
- func (this *IntStringMap) BatchRemove(keys []int)
- func (this *IntStringMap) BatchSet(m map[int]string)
- func (this *IntStringMap) Clear()
- func (this *IntStringMap) Clone() *map[int]string
- func (this *IntStringMap) Contains(key int) bool
- func (this *IntStringMap) Get(key int) string
- func (this *IntStringMap) GetAndRemove(key int) string
- func (this *IntStringMap) GetWithDefault(key int, value string) string
- func (this *IntStringMap) IsEmpty() bool
- func (this *IntStringMap) Iterator(f func(k int, v string) bool)
- func (this *IntStringMap) Keys() []int
- func (this *IntStringMap) LockFunc(f func(m map[int]string))
- func (this *IntStringMap) RLockFunc(f func(m map[int]string))
- func (this *IntStringMap) Remove(key int)
- func (this *IntStringMap) Set(key int, val string)
- func (this *IntStringMap) Size() int
- func (this *IntStringMap) Values() []string
- type InterfaceInterfaceMap
- func (this *InterfaceInterfaceMap) BatchRemove(keys []interface{})
- func (this *InterfaceInterfaceMap) BatchSet(m map[interface{}]interface{})
- func (this *InterfaceInterfaceMap) Clear()
- func (this *InterfaceInterfaceMap) Clone() *map[interface{}]interface{}
- func (this *InterfaceInterfaceMap) Contains(key interface{}) bool
- func (this *InterfaceInterfaceMap) Get(key interface{}) interface{}
- func (this *InterfaceInterfaceMap) GetAndRemove(key interface{}) interface{}
- func (this *InterfaceInterfaceMap) GetBool(key interface{}) bool
- func (this *InterfaceInterfaceMap) GetFloat32(key interface{}) float32
- func (this *InterfaceInterfaceMap) GetFloat64(key interface{}) float64
- func (this *InterfaceInterfaceMap) GetInt(key interface{}) int
- func (this *InterfaceInterfaceMap) GetString(key interface{}) string
- func (this *InterfaceInterfaceMap) GetUint(key interface{}) uint
- func (this *InterfaceInterfaceMap) GetWithDefault(key interface{}, value interface{}) interface{}
- func (this *InterfaceInterfaceMap) IsEmpty() bool
- func (this *InterfaceInterfaceMap) Iterator(f func(k interface{}, v interface{}) bool)
- func (this *InterfaceInterfaceMap) Keys() []interface{}
- func (this *InterfaceInterfaceMap) LockFunc(f func(m map[interface{}]interface{}))
- func (this *InterfaceInterfaceMap) RLockFunc(f func(m map[interface{}]interface{}))
- func (this *InterfaceInterfaceMap) Remove(key interface{})
- func (this *InterfaceInterfaceMap) Set(key interface{}, val interface{})
- func (this *InterfaceInterfaceMap) Size() int
- func (this *InterfaceInterfaceMap) Values() []interface{}
- type StringBoolMap
- func (this *StringBoolMap) BatchRemove(keys []string)
- func (this *StringBoolMap) BatchSet(m map[string]bool)
- func (this *StringBoolMap) Clear()
- func (this *StringBoolMap) Clone() *map[string]bool
- func (this *StringBoolMap) Contains(key string) bool
- func (this *StringBoolMap) Get(key string) bool
- func (this *StringBoolMap) GetAndRemove(key string) bool
- func (this *StringBoolMap) GetWithDefault(key string, value bool) bool
- func (this *StringBoolMap) IsEmpty() bool
- func (this *StringBoolMap) Iterator(f func(k string, v bool) bool)
- func (this *StringBoolMap) Keys() []string
- func (this *StringBoolMap) LockFunc(f func(m map[string]bool))
- func (this *StringBoolMap) RLockFunc(f func(m map[string]bool))
- func (this *StringBoolMap) Remove(key string)
- func (this *StringBoolMap) Set(key string, val bool)
- func (this *StringBoolMap) Size() int
- type StringIntMap
- func (this *StringIntMap) BatchRemove(keys []string)
- func (this *StringIntMap) BatchSet(m map[string]int)
- func (this *StringIntMap) Clear()
- func (this *StringIntMap) Clone() *map[string]int
- func (this *StringIntMap) Contains(key string) bool
- func (this *StringIntMap) Get(key string) int
- func (this *StringIntMap) GetAndRemove(key string) int
- func (this *StringIntMap) GetWithDefault(key string, value int) int
- func (this *StringIntMap) IsEmpty() bool
- func (this *StringIntMap) Iterator(f func(k string, v int) bool)
- func (this *StringIntMap) Keys() []string
- func (this *StringIntMap) LockFunc(f func(m map[string]int))
- func (this *StringIntMap) RLockFunc(f func(m map[string]int))
- func (this *StringIntMap) Remove(key string)
- func (this *StringIntMap) Set(key string, val int)
- func (this *StringIntMap) Size() int
- func (this *StringIntMap) Values() []int
- type StringInterfaceMap
- func (this *StringInterfaceMap) BatchRemove(keys []string)
- func (this *StringInterfaceMap) BatchSet(m map[string]interface{})
- func (this *StringInterfaceMap) Clear()
- func (this *StringInterfaceMap) Clone() *map[string]interface{}
- func (this *StringInterfaceMap) Contains(key string) bool
- func (this *StringInterfaceMap) Get(key string) interface{}
- func (this *StringInterfaceMap) GetAndRemove(key string) interface{}
- func (this *StringInterfaceMap) GetBool(key string) bool
- func (this *StringInterfaceMap) GetFloat32(key string) float32
- func (this *StringInterfaceMap) GetFloat64(key string) float64
- func (this *StringInterfaceMap) GetInt(key string) int
- func (this *StringInterfaceMap) GetString(key string) string
- func (this *StringInterfaceMap) GetUint(key string) uint
- func (this *StringInterfaceMap) GetWithDefault(key string, value interface{}) interface{}
- func (this *StringInterfaceMap) IsEmpty() bool
- func (this *StringInterfaceMap) Iterator(f func(k string, v interface{}) bool)
- func (this *StringInterfaceMap) Keys() []string
- func (this *StringInterfaceMap) LockFunc(f func(m map[string]interface{}))
- func (this *StringInterfaceMap) RLockFunc(f func(m map[string]interface{}))
- func (this *StringInterfaceMap) Remove(key string)
- func (this *StringInterfaceMap) Set(key string, val interface{})
- func (this *StringInterfaceMap) Size() int
- func (this *StringInterfaceMap) Values() []interface{}
- type StringStringMap
- func (this *StringStringMap) BatchRemove(keys []string)
- func (this *StringStringMap) BatchSet(m map[string]string)
- func (this *StringStringMap) Clear()
- func (this *StringStringMap) Clone() *map[string]string
- func (this *StringStringMap) Contains(key string) bool
- func (this *StringStringMap) Get(key string) string
- func (this *StringStringMap) GetAndRemove(key string) string
- func (this *StringStringMap) GetWithDefault(key string, value string) string
- func (this *StringStringMap) IsEmpty() bool
- func (this *StringStringMap) Iterator(f func(k string, v string) bool)
- func (this *StringStringMap) Keys() []string
- func (this *StringStringMap) LockFunc(f func(m map[string]string))
- func (this *StringStringMap) RLockFunc(f func(m map[string]string))
- func (this *StringStringMap) Remove(key string)
- func (this *StringStringMap) Set(key string, val string)
- func (this *StringStringMap) Size() int
- func (this *StringStringMap) Values() []string
- type UintInterfaceMap
- func (this *UintInterfaceMap) BatchRemove(keys []uint)
- func (this *UintInterfaceMap) BatchSet(m map[uint]interface{})
- func (this *UintInterfaceMap) Clear()
- func (this *UintInterfaceMap) Clone() *map[uint]interface{}
- func (this *UintInterfaceMap) Contains(key uint) bool
- func (this *UintInterfaceMap) Get(key uint) interface{}
- func (this *UintInterfaceMap) GetAndRemove(key uint) interface{}
- func (this *UintInterfaceMap) GetBool(key uint) bool
- func (this *UintInterfaceMap) GetFloat32(key uint) float32
- func (this *UintInterfaceMap) GetFloat64(key uint) float64
- func (this *UintInterfaceMap) GetInt(key uint) int
- func (this *UintInterfaceMap) GetString(key uint) string
- func (this *UintInterfaceMap) GetUint(key uint) uint
- func (this *UintInterfaceMap) GetWithDefault(key uint, value interface{}) interface{}
- func (this *UintInterfaceMap) IsEmpty() bool
- func (this *UintInterfaceMap) Iterator(f func(k uint, v interface{}) bool)
- func (this *UintInterfaceMap) Keys() []uint
- func (this *UintInterfaceMap) LockFunc(f func(m map[uint]interface{}))
- func (this *UintInterfaceMap) RLockFunc(f func(m map[uint]interface{}))
- func (this *UintInterfaceMap) Remove(key uint)
- func (this *UintInterfaceMap) Set(key uint, val interface{})
- func (this *UintInterfaceMap) Size() int
- func (this *UintInterfaceMap) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntBoolMap ¶
type IntBoolMap struct {
// contains filtered or unexported fields
}
func NewIntBoolMap ¶
func NewIntBoolMap() *IntBoolMap
func (*IntBoolMap) GetWithDefault ¶
func (this *IntBoolMap) GetWithDefault(key int, value bool) bool
获取键值,如果键值不存在则写入默认值
func (*IntBoolMap) Iterator ¶
func (this *IntBoolMap) Iterator(f func(k int, v bool) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*IntBoolMap) LockFunc ¶
func (this *IntBoolMap) LockFunc(f func(m map[int]bool))
使用自定义方法执行加锁修改操作
func (*IntBoolMap) RLockFunc ¶
func (this *IntBoolMap) RLockFunc(f func(m map[int]bool))
使用自定义方法执行加锁读取操作
type IntIntMap ¶
type IntIntMap struct {
// contains filtered or unexported fields
}
func NewIntIntMap ¶
func NewIntIntMap() *IntIntMap
func (*IntIntMap) GetWithDefault ¶
获取键值,如果键值不存在则写入默认值
type IntInterfaceMap ¶
type IntInterfaceMap struct {
// contains filtered or unexported fields
}
func NewIntInterfaceMap ¶
func NewIntInterfaceMap() *IntInterfaceMap
func (*IntInterfaceMap) BatchSet ¶
func (this *IntInterfaceMap) BatchSet(m map[int]interface{})
批量设置键值对
func (*IntInterfaceMap) GetAndRemove ¶
func (this *IntInterfaceMap) GetAndRemove(key int) interface{}
返回对应的键值,并删除该键值
func (*IntInterfaceMap) GetBool ¶
func (this *IntInterfaceMap) GetBool(key int) bool
func (*IntInterfaceMap) GetFloat32 ¶
func (this *IntInterfaceMap) GetFloat32(key int) float32
func (*IntInterfaceMap) GetFloat64 ¶
func (this *IntInterfaceMap) GetFloat64(key int) float64
func (*IntInterfaceMap) GetInt ¶
func (this *IntInterfaceMap) GetInt(key int) int
func (*IntInterfaceMap) GetString ¶
func (this *IntInterfaceMap) GetString(key int) string
func (*IntInterfaceMap) GetUint ¶
func (this *IntInterfaceMap) GetUint(key int) uint
func (*IntInterfaceMap) GetWithDefault ¶
func (this *IntInterfaceMap) GetWithDefault(key int, value interface{}) interface{}
获取键值,如果键值不存在则写入默认值
func (*IntInterfaceMap) Iterator ¶
func (this *IntInterfaceMap) Iterator(f func(k int, v interface{}) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*IntInterfaceMap) LockFunc ¶
func (this *IntInterfaceMap) LockFunc(f func(m map[int]interface{}))
使用自定义方法执行加锁修改操作
func (*IntInterfaceMap) RLockFunc ¶
func (this *IntInterfaceMap) RLockFunc(f func(m map[int]interface{}))
使用自定义方法执行加锁读取操作
type IntStringMap ¶
type IntStringMap struct {
// contains filtered or unexported fields
}
func NewIntStringMap ¶
func NewIntStringMap() *IntStringMap
func (*IntStringMap) GetAndRemove ¶
func (this *IntStringMap) GetAndRemove(key int) string
返回对应的键值,并删除该键值
func (*IntStringMap) GetWithDefault ¶
func (this *IntStringMap) GetWithDefault(key int, value string) string
获取键值,如果键值不存在则写入默认值
func (*IntStringMap) Iterator ¶
func (this *IntStringMap) Iterator(f func(k int, v string) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*IntStringMap) LockFunc ¶
func (this *IntStringMap) LockFunc(f func(m map[int]string))
使用自定义方法执行加锁修改操作
func (*IntStringMap) RLockFunc ¶
func (this *IntStringMap) RLockFunc(f func(m map[int]string))
使用自定义方法执行加锁读取操作
type InterfaceInterfaceMap ¶
type InterfaceInterfaceMap struct {
// contains filtered or unexported fields
}
func NewInterfaceInterfaceMap ¶
func NewInterfaceInterfaceMap() *InterfaceInterfaceMap
func (*InterfaceInterfaceMap) BatchRemove ¶
func (this *InterfaceInterfaceMap) BatchRemove(keys []interface{})
批量删除键值对
func (*InterfaceInterfaceMap) BatchSet ¶
func (this *InterfaceInterfaceMap) BatchSet(m map[interface{}]interface{})
批量设置键值对
func (*InterfaceInterfaceMap) Clone ¶
func (this *InterfaceInterfaceMap) Clone() *map[interface{}]interface{}
哈希表克隆
func (*InterfaceInterfaceMap) Contains ¶
func (this *InterfaceInterfaceMap) Contains(key interface{}) bool
是否存在某个键
func (*InterfaceInterfaceMap) Get ¶
func (this *InterfaceInterfaceMap) Get(key interface{}) interface{}
获取键值
func (*InterfaceInterfaceMap) GetAndRemove ¶
func (this *InterfaceInterfaceMap) GetAndRemove(key interface{}) interface{}
返回对应的键值,并删除该键值
func (*InterfaceInterfaceMap) GetBool ¶
func (this *InterfaceInterfaceMap) GetBool(key interface{}) bool
func (*InterfaceInterfaceMap) GetFloat32 ¶
func (this *InterfaceInterfaceMap) GetFloat32(key interface{}) float32
func (*InterfaceInterfaceMap) GetFloat64 ¶
func (this *InterfaceInterfaceMap) GetFloat64(key interface{}) float64
func (*InterfaceInterfaceMap) GetInt ¶
func (this *InterfaceInterfaceMap) GetInt(key interface{}) int
func (*InterfaceInterfaceMap) GetString ¶
func (this *InterfaceInterfaceMap) GetString(key interface{}) string
func (*InterfaceInterfaceMap) GetUint ¶
func (this *InterfaceInterfaceMap) GetUint(key interface{}) uint
func (*InterfaceInterfaceMap) GetWithDefault ¶
func (this *InterfaceInterfaceMap) GetWithDefault(key interface{}, value interface{}) interface{}
获取键值,如果键值不存在则写入默认值
func (*InterfaceInterfaceMap) Iterator ¶
func (this *InterfaceInterfaceMap) Iterator(f func(k interface{}, v interface{}) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*InterfaceInterfaceMap) LockFunc ¶
func (this *InterfaceInterfaceMap) LockFunc(f func(m map[interface{}]interface{}))
使用自定义方法执行加锁修改操作
func (*InterfaceInterfaceMap) RLockFunc ¶
func (this *InterfaceInterfaceMap) RLockFunc(f func(m map[interface{}]interface{}))
使用自定义方法执行加锁读取操作
func (*InterfaceInterfaceMap) Remove ¶
func (this *InterfaceInterfaceMap) Remove(key interface{})
删除键值对
func (*InterfaceInterfaceMap) Set ¶
func (this *InterfaceInterfaceMap) Set(key interface{}, val interface{})
设置键值对
func (*InterfaceInterfaceMap) Values ¶
func (this *InterfaceInterfaceMap) Values() []interface{}
返回值列表(注意是随机排序)
type StringBoolMap ¶
type StringBoolMap struct {
// contains filtered or unexported fields
}
func NewStringBoolMap ¶
func NewStringBoolMap() *StringBoolMap
func (*StringBoolMap) GetAndRemove ¶
func (this *StringBoolMap) GetAndRemove(key string) bool
返回对应的键值,并删除该键值
func (*StringBoolMap) GetWithDefault ¶
func (this *StringBoolMap) GetWithDefault(key string, value bool) bool
获取键值,如果键值不存在则写入默认值
func (*StringBoolMap) Iterator ¶
func (this *StringBoolMap) Iterator(f func(k string, v bool) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*StringBoolMap) LockFunc ¶
func (this *StringBoolMap) LockFunc(f func(m map[string]bool))
使用自定义方法执行加锁修改操作
func (*StringBoolMap) RLockFunc ¶
func (this *StringBoolMap) RLockFunc(f func(m map[string]bool))
使用自定义方法执行加锁读取操作
type StringIntMap ¶
type StringIntMap struct {
// contains filtered or unexported fields
}
func NewStringIntMap ¶
func NewStringIntMap() *StringIntMap
func (*StringIntMap) GetAndRemove ¶
func (this *StringIntMap) GetAndRemove(key string) int
返回对应的键值,并删除该键值
func (*StringIntMap) GetWithDefault ¶
func (this *StringIntMap) GetWithDefault(key string, value int) int
获取键值,如果键值不存在则写入默认值
func (*StringIntMap) Iterator ¶
func (this *StringIntMap) Iterator(f func(k string, v int) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*StringIntMap) LockFunc ¶
func (this *StringIntMap) LockFunc(f func(m map[string]int))
使用自定义方法执行加锁修改操作
func (*StringIntMap) RLockFunc ¶
func (this *StringIntMap) RLockFunc(f func(m map[string]int))
使用自定义方法执行加锁读取操作
type StringInterfaceMap ¶
type StringInterfaceMap struct {
// contains filtered or unexported fields
}
func NewStringInterfaceMap ¶
func NewStringInterfaceMap() *StringInterfaceMap
func (*StringInterfaceMap) BatchRemove ¶
func (this *StringInterfaceMap) BatchRemove(keys []string)
批量删除键值对
func (*StringInterfaceMap) BatchSet ¶
func (this *StringInterfaceMap) BatchSet(m map[string]interface{})
批量设置键值对
func (*StringInterfaceMap) Clone ¶
func (this *StringInterfaceMap) Clone() *map[string]interface{}
哈希表克隆
func (*StringInterfaceMap) Contains ¶
func (this *StringInterfaceMap) Contains(key string) bool
是否存在某个键
func (*StringInterfaceMap) GetAndRemove ¶
func (this *StringInterfaceMap) GetAndRemove(key string) interface{}
返回对应的键值,并删除该键值
func (*StringInterfaceMap) GetBool ¶
func (this *StringInterfaceMap) GetBool(key string) bool
func (*StringInterfaceMap) GetFloat32 ¶
func (this *StringInterfaceMap) GetFloat32(key string) float32
func (*StringInterfaceMap) GetFloat64 ¶
func (this *StringInterfaceMap) GetFloat64(key string) float64
func (*StringInterfaceMap) GetInt ¶
func (this *StringInterfaceMap) GetInt(key string) int
func (*StringInterfaceMap) GetString ¶
func (this *StringInterfaceMap) GetString(key string) string
func (*StringInterfaceMap) GetUint ¶
func (this *StringInterfaceMap) GetUint(key string) uint
func (*StringInterfaceMap) GetWithDefault ¶
func (this *StringInterfaceMap) GetWithDefault(key string, value interface{}) interface{}
获取键值,如果键值不存在则写入默认值
func (*StringInterfaceMap) Iterator ¶
func (this *StringInterfaceMap) Iterator(f func(k string, v interface{}) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*StringInterfaceMap) LockFunc ¶
func (this *StringInterfaceMap) LockFunc(f func(m map[string]interface{}))
使用自定义方法执行加锁修改操作
func (*StringInterfaceMap) RLockFunc ¶
func (this *StringInterfaceMap) RLockFunc(f func(m map[string]interface{}))
使用自定义方法执行加锁读取操作
func (*StringInterfaceMap) Set ¶
func (this *StringInterfaceMap) Set(key string, val interface{})
设置键值对
func (*StringInterfaceMap) Values ¶
func (this *StringInterfaceMap) Values() []interface{}
返回值列表(注意是随机排序)
type StringStringMap ¶
type StringStringMap struct {
// contains filtered or unexported fields
}
func NewStringStringMap ¶
func NewStringStringMap() *StringStringMap
func (*StringStringMap) BatchRemove ¶
func (this *StringStringMap) BatchRemove(keys []string)
批量删除键值对
func (*StringStringMap) BatchSet ¶
func (this *StringStringMap) BatchSet(m map[string]string)
批量设置键值对
func (*StringStringMap) GetAndRemove ¶
func (this *StringStringMap) GetAndRemove(key string) string
返回对应的键值,并删除该键值
func (*StringStringMap) GetWithDefault ¶
func (this *StringStringMap) GetWithDefault(key string, value string) string
获取键值,如果键值不存在则写入默认值
func (*StringStringMap) Iterator ¶
func (this *StringStringMap) Iterator(f func(k string, v string) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
func (*StringStringMap) LockFunc ¶
func (this *StringStringMap) LockFunc(f func(m map[string]string))
使用自定义方法执行加锁修改操作
func (*StringStringMap) RLockFunc ¶
func (this *StringStringMap) RLockFunc(f func(m map[string]string))
使用自定义方法执行加锁读取操作
type UintInterfaceMap ¶
type UintInterfaceMap struct {
// contains filtered or unexported fields
}
func NewUintInterfaceMap ¶
func NewUintInterfaceMap() *UintInterfaceMap
func (*UintInterfaceMap) BatchRemove ¶
func (this *UintInterfaceMap) BatchRemove(keys []uint)
批量删除键值对
func (*UintInterfaceMap) BatchSet ¶
func (this *UintInterfaceMap) BatchSet(m map[uint]interface{})
批量设置键值对
func (*UintInterfaceMap) GetAndRemove ¶
func (this *UintInterfaceMap) GetAndRemove(key uint) interface{}
返回对应的键值,并删除该键值
func (*UintInterfaceMap) GetBool ¶
func (this *UintInterfaceMap) GetBool(key uint) bool
func (*UintInterfaceMap) GetFloat32 ¶
func (this *UintInterfaceMap) GetFloat32(key uint) float32
func (*UintInterfaceMap) GetFloat64 ¶
func (this *UintInterfaceMap) GetFloat64(key uint) float64
func (*UintInterfaceMap) GetInt ¶
func (this *UintInterfaceMap) GetInt(key uint) int
func (*UintInterfaceMap) GetString ¶
func (this *UintInterfaceMap) GetString(key uint) string
func (*UintInterfaceMap) GetUint ¶
func (this *UintInterfaceMap) GetUint(key uint) uint
func (*UintInterfaceMap) GetWithDefault ¶
func (this *UintInterfaceMap) GetWithDefault(key uint, value interface{}) interface{}
获取键值,如果键值不存在则写入默认值
func (*UintInterfaceMap) Iterator ¶
func (this *UintInterfaceMap) Iterator(f func(k uint, v interface{}) bool)
func (*UintInterfaceMap) LockFunc ¶
func (this *UintInterfaceMap) LockFunc(f func(m map[uint]interface{}))
使用自定义方法执行加锁修改操作
func (*UintInterfaceMap) RLockFunc ¶
func (this *UintInterfaceMap) RLockFunc(f func(m map[uint]interface{}))
使用自定义方法执行加锁读取操作
func (*UintInterfaceMap) Values ¶
func (this *UintInterfaceMap) Values() []interface{}
返回值列表(注意是随机排序)