hashset

package
v0.0.0-...-63a9d49 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSet

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

func NewHashSet

func NewHashSet() *HashSet

func (*HashSet) Add

func (set *HashSet) Add(item interface{})

向集合中添加指定元素。

func (*HashSet) Clear

func (set *HashSet) Clear()

从集合中删除所有元素。

func (*HashSet) Contains

func (set *HashSet) Contains(item interface{}) bool

检查集合中是否包含指定元素。

func (*HashSet) IsEmpty

func (set *HashSet) IsEmpty() bool

检查集合是否为空。

func (*HashSet) Iterator

func (set *HashSet) Iterator() <-chan interface{}

返回一个迭代器,用于迭代集合中的元素。

func (*HashSet) Remove

func (set *HashSet) Remove(item interface{})

从集合中删除指定元素。

func (*HashSet) Size

func (set *HashSet) Size() int

返回集合中的元素数量。

func (*HashSet) ToArray

func (set *HashSet) ToArray() []interface{}

将集合转换为数组。

Jump to

Keyboard shortcuts

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