set

package
v1.0.0-beta.201 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 1 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] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](items ...T) *Set[T]

func Subtract

func Subtract[T comparable](a *Set[T], b ...*Set[T]) *Set[T]

Subtract removes all items from a that are also in b

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]) AsSlice

func (s *Set[T]) AsSlice() []T

func (*Set[T]) IsEmpty

func (s *Set[T]) IsEmpty() bool

func (*Set[T]) Remove

func (s *Set[T]) Remove(items ...T)

Jump to

Keyboard shortcuts

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