set

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 2 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] struct {
	// contains filtered or unexported fields
}

func New added in v1.0.0

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

func (*Set[T]) Add

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

func (*Set[T]) All

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

func (*Set[T]) Clear

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

func (*Set[T]) Copy

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

func (*Set[T]) Count

func (s *Set[T]) Count() int

func (*Set[T]) Diff

func (s *Set[T]) Diff(other *Set[T]) *Set[T]

func (*Set[T]) Equal

func (s *Set[T]) Equal(other *Set[T]) bool

func (*Set[T]) Has

func (s *Set[T]) Has(items ...T) bool

func (*Set[T]) HasSubset

func (s *Set[T]) HasSubset(other *Set[T]) bool

func (*Set[T]) Intersect

func (s *Set[T]) Intersect(other *Set[T]) *Set[T]

func (*Set[T]) Iter

func (s *Set[T]) Iter(ctx context.Context) <-chan T

func (*Set[T]) MirrorDiff

func (s *Set[T]) MirrorDiff(other *Set[T]) *Set[T]

func (*Set[T]) Remove

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

func (*Set[T]) SubsetOf

func (s *Set[T]) SubsetOf(other *Set[T]) bool

func (*Set[T]) Union

func (s *Set[T]) Union(other *Set[T]) *Set[T]

Jump to

Keyboard shortcuts

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