hashset

package
v0.0.0-...-9899634 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{}

Config holds the values for configuring a HashSet.

type HashSet

type HashSet[T comparable] struct {
	// contains filtered or unexported fields
}

HashSet represents a set of elements of type T.

func New

func New[T comparable](opts ...Option) *HashSet[T]

New creates an empty HashSet.

func (*HashSet[T]) Add

func (s *HashSet[T]) Add(item T)

func (*HashSet[T]) AddAll

func (s *HashSet[T]) AddAll(sequence iter.Seq[T])

func (*HashSet[T]) All

func (s *HashSet[T]) All() iter.Seq[T]

func (*HashSet[T]) Contains

func (s *HashSet[T]) Contains(item T) bool

func (*HashSet[T]) ContainsAll

func (s *HashSet[T]) ContainsAll(other collections.Collection[T]) bool

func (*HashSet[T]) Empty

func (s *HashSet[T]) Empty() bool

func (*HashSet[T]) Remove

func (s *HashSet[T]) Remove() T

func (*HashSet[T]) RemoveAll

func (s *HashSet[T]) RemoveAll(other collections.Collection[T])

func (*HashSet[T]) RemoveElement

func (s *HashSet[T]) RemoveElement(item T)

func (*HashSet[T]) RetainAll

func (s *HashSet[T]) RetainAll(other collections.Collection[T])

func (*HashSet[T]) Size

func (s *HashSet[T]) Size() int

func (*HashSet[T]) String

func (s *HashSet[T]) String() string

type Option

type Option func(*Config)

Option configures a HashSet config

Jump to

Keyboard shortcuts

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