set

package
v0.0.0-...-53ad115 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 2 Imported by: 0

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 New

func New[T comparable]() Set[T]

func NewFromIter

func NewFromIter[T comparable](fromiter iter.Seq[T]) Set[T]

func NewFromSlice

func NewFromSlice[T comparable](fromList []T) Set[T]

func NewWithCapacity

func NewWithCapacity[T comparable](capacity uint64) Set[T]

func (Set[T]) Contains

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

func (Set[T]) Delete

func (set Set[T]) Delete(element T)

func (Set[T]) Equal

func (set Set[T]) Equal(target Set[T]) bool

func (Set[T]) Insert

func (set Set[T]) Insert(element T)

func (Set[T]) InsertIter

func (set Set[T]) InsertIter(iterator iter.Seq[T])

func (Set[T]) Iter

func (set Set[T]) Iter() iter.Seq[T]

Iter returns an iterator yelding the elements of the set

func (Set[T]) ToSlice

func (set Set[T]) ToSlice() []T

Jump to

Keyboard shortcuts

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