gset

package
v0.0.0-...-3631402 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

并发安全的集合SET.

Index

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
}

func NewIntSet

func NewIntSet() *IntSet

func (*IntSet) Add

func (this *IntSet) Add(item int) *IntSet

设置键

func (*IntSet) BatchAdd

func (this *IntSet) BatchAdd(items []int) *IntSet

批量添加设置键

func (*IntSet) Clear

func (this *IntSet) Clear()

清空set

func (*IntSet) Contains

func (this *IntSet) Contains(item int) bool

键是否存在

func (*IntSet) Iterator

func (this *IntSet) Iterator(f func(v int) bool)

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

func (*IntSet) Remove

func (this *IntSet) Remove(key int)

删除键值对

func (*IntSet) Size

func (this *IntSet) Size() int

大小

func (*IntSet) Slice

func (this *IntSet) Slice() []int

转换为数组

func (*IntSet) String

func (this *IntSet) String() string

转换为字符串

type InterfaceSet

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

func NewInterfaceSet

func NewInterfaceSet() *InterfaceSet

func (*InterfaceSet) Add

func (this *InterfaceSet) Add(item interface{}) *InterfaceSet

添加

func (*InterfaceSet) BatchAdd

func (this *InterfaceSet) BatchAdd(items []interface{}) *InterfaceSet

批量添加

func (*InterfaceSet) Clear

func (this *InterfaceSet) Clear()

清空set

func (*InterfaceSet) Contains

func (this *InterfaceSet) Contains(item interface{}) bool

键是否存在

func (*InterfaceSet) Iterator

func (this *InterfaceSet) Iterator(f func(v interface{}) bool)

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

func (*InterfaceSet) Remove

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

删除键值对

func (*InterfaceSet) Size

func (this *InterfaceSet) Size() int

大小

func (*InterfaceSet) Slice

func (this *InterfaceSet) Slice() []interface{}

转换为数组

func (*InterfaceSet) String

func (this *InterfaceSet) String() string

转换为字符串

type StringSet

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

func NewStringSet

func NewStringSet() *StringSet

func (*StringSet) Add

func (this *StringSet) Add(item string) *StringSet

设置键

func (*StringSet) BatchAdd

func (this *StringSet) BatchAdd(items []string) *StringSet

批量添加设置键

func (*StringSet) Clear

func (this *StringSet) Clear()

清空set

func (*StringSet) Contains

func (this *StringSet) Contains(item string) bool

键是否存在

func (*StringSet) Iterator

func (this *StringSet) Iterator(f func(v string) bool)

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

func (*StringSet) Remove

func (this *StringSet) Remove(key string)

删除键值对

func (*StringSet) Size

func (this *StringSet) Size() int

大小

func (*StringSet) Slice

func (this *StringSet) Slice() []string

转换为数组

func (*StringSet) String

func (this *StringSet) String() string

转换为字符串

type UintSet

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

func NewUintSet

func NewUintSet() *UintSet

func (*UintSet) Add

func (this *UintSet) Add(item uint) *UintSet

添加

func (*UintSet) BatchAdd

func (this *UintSet) BatchAdd(items []uint) *UintSet

批量添加

func (*UintSet) Clear

func (this *UintSet) Clear()

清空set

func (*UintSet) Contains

func (this *UintSet) Contains(item uint) bool

键是否存在

func (*UintSet) Iterator

func (this *UintSet) Iterator(f func(v uint) bool)

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

func (*UintSet) Remove

func (this *UintSet) Remove(key uint)

删除键值对

func (*UintSet) Size

func (this *UintSet) Size() int

大小

func (*UintSet) Slice

func (this *UintSet) Slice() []uint

转换为数组

func (*UintSet) String

func (this *UintSet) String() string

转换为字符串

Jump to

Keyboard shortcuts

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