Documentation ¶
Overview ¶
并发安全的集合SET.
Index ¶
- type IntSet
- func (this *IntSet) Add(item int) *IntSet
- func (this *IntSet) BatchAdd(items []int) *IntSet
- func (this *IntSet) Clear()
- func (this *IntSet) Contains(item int) bool
- func (this *IntSet) Iterator(f func(v int) bool)
- func (this *IntSet) Remove(key int)
- func (this *IntSet) Size() int
- func (this *IntSet) Slice() []int
- func (this *IntSet) String() string
- type InterfaceSet
- func (this *InterfaceSet) Add(item interface{}) *InterfaceSet
- func (this *InterfaceSet) BatchAdd(items []interface{}) *InterfaceSet
- func (this *InterfaceSet) Clear()
- func (this *InterfaceSet) Contains(item interface{}) bool
- func (this *InterfaceSet) Iterator(f func(v interface{}) bool)
- func (this *InterfaceSet) Remove(key interface{})
- func (this *InterfaceSet) Size() int
- func (this *InterfaceSet) Slice() []interface{}
- func (this *InterfaceSet) String() string
- type StringSet
- func (this *StringSet) Add(item string) *StringSet
- func (this *StringSet) BatchAdd(items []string) *StringSet
- func (this *StringSet) Clear()
- func (this *StringSet) Contains(item string) bool
- func (this *StringSet) Iterator(f func(v string) bool)
- func (this *StringSet) Remove(key string)
- func (this *StringSet) Size() int
- func (this *StringSet) Slice() []string
- func (this *StringSet) String() string
- type UintSet
- func (this *UintSet) Add(item uint) *UintSet
- func (this *UintSet) BatchAdd(items []uint) *UintSet
- func (this *UintSet) Clear()
- func (this *UintSet) Contains(item uint) bool
- func (this *UintSet) Iterator(f func(v uint) bool)
- func (this *UintSet) Remove(key uint)
- func (this *UintSet) Size() int
- func (this *UintSet) Slice() []uint
- func (this *UintSet) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntSet ¶
type IntSet struct {
// contains filtered or unexported fields
}
type InterfaceSet ¶
type InterfaceSet struct {
// contains filtered or unexported fields
}
func NewInterfaceSet ¶
func NewInterfaceSet() *InterfaceSet
func (*InterfaceSet) BatchAdd ¶
func (this *InterfaceSet) BatchAdd(items []interface{}) *InterfaceSet
批量添加
func (*InterfaceSet) Iterator ¶
func (this *InterfaceSet) Iterator(f func(v interface{}) bool)
给定回调函数对原始内容进行遍历,回调函数返回true表示继续遍历,否则停止遍历
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
func NewStringSet ¶
func NewStringSet() *StringSet
Click to show internal directories.
Click to hide internal directories.