set

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: GPL-3.0 Imports: 2 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
}

HashSet 哈希集合类

func NewHashSet

func NewHashSet() *HashSet

NewHashSet get new instance of HashSet

func (*HashSet) Add

func (set *HashSet) Add(e interface{}) bool

Add add one element to hashset

func (*HashSet) Clear

func (set *HashSet) Clear()

Clear clear hashset

func (*HashSet) Contains

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

Contains check if hashset contains the element

func (*HashSet) Len

func (set *HashSet) Len() int

Len get the length of hashset

func (*HashSet) Remove

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

Remove remove one element form hashset

func (*HashSet) String

func (set *HashSet) String() string

String format hashset to string

type Set

type Set interface {
	Add(e interface{}) bool
	Remove(e interface{})
	Clear()
	Contains(e interface{}) bool
	Len() int
	String() string
}

Set 接口

Jump to

Keyboard shortcuts

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