sets

package
v0.0.0-...-57f3b98 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderedComparable

type OrderedComparable interface {
	constraints.Ordered
	comparable
}

type Set

type Set[T OrderedComparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T constraints.Ordered](ts ...T) *Set[T]

func (*Set[T]) Add

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

func (*Set[T]) All

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

func (*Set[T]) Delete

func (s *Set[T]) Delete(t T)

func (*Set[T]) Difference

func (s *Set[T]) Difference(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(t T) bool

func (*Set[T]) Intersect

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

func (*Set[T]) Len

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

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