set

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

集合

func NewSet

func NewSet() *Set

创建新的set

func (*Set) Add

func (s *Set) Add(item int64)

往set中添加元素

func (*Set) Clear

func (s *Set) Clear()

清空set

func (*Set) Has

func (s *Set) Has(item int64) bool

判断set中是否有某个元素

func (*Set) IsEmpty

func (s *Set) IsEmpty() bool

判断set是否为空

func (*Set) Len

func (s *Set) Len() int

获取set的长度

func (*Set) List

func (s *Set) List() []int64

获取set的所有元素

func (*Set) Remove

func (s *Set) Remove(item int64)

移除set中的元素

Jump to

Keyboard shortcuts

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