set

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 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[E comparable] struct {
	// contains filtered or unexported fields
}

func (*HashSet[E]) Add

func (hs *HashSet[E]) Add(e E) bool

func (*HashSet[E]) Clear

func (hs *HashSet[E]) Clear()

func (*HashSet[E]) Contains

func (hs *HashSet[E]) Contains(e E) bool

func (*HashSet[E]) IsEmpty

func (hs *HashSet[E]) IsEmpty() bool

func (*HashSet[E]) Size

func (hs *HashSet[E]) Size() int

type Set

type Set[E comparable] interface {
	Add(e E) bool
	Contains(e E) bool
	Clear()
	IsEmpty() bool
	Size() int
}

func Empty

func Empty[E comparable]() Set[E]

func New

func New[E comparable](elements ...E) Set[E]

Jump to

Keyboard shortcuts

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