set

package
v0.0.0-...-4008a61 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[T comparable] map[T]struct{}

func NewSet

func NewSet[T comparable](items ...T) Set[T]

func NewSetSize

func NewSetSize[T comparable](size int, items ...T) Set[T]

func Union

func Union[T comparable](sets ...Set[T]) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(items ...T)

func (Set[T]) Contains

func (s Set[T]) Contains(item T) bool

func (Set[T]) Items

func (s Set[T]) Items() []T

func (Set[T]) Len

func (s Set[T]) Len() int

func (Set[T]) Merge

func (s Set[T]) Merge(other Set[T])

func (Set[T]) Remove

func (s Set[T]) Remove(item T)

Jump to

Keyboard shortcuts

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