containers

package
v0.0.0-...-f01c647 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 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 constraints.Ordered] map[T]empty

func NewSet

func NewSet[T constraints.Ordered](elements ...T) Set[T]

func (Set[T]) Add

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

func (Set[T]) Clear

func (s Set[T]) Clear()

func (Set[T]) Clone

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

func (Set[T]) Contains

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

func (Set[T]) Difference

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

func (Set[T]) Equals

func (s Set[T]) Equals(other Set[T]) bool

func (Set[T]) Intersection

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

func (Set[T]) Intersects

func (s Set[T]) Intersects(other Set[T]) bool

func (Set[T]) IsEmpty

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

func (Set[T]) Items

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

func (Set[T]) Iterator

func (s Set[T]) Iterator() <-chan T

func (Set[T]) IteratorWithLimit

func (s Set[T]) IteratorWithLimit(limit int) <-chan T

func (Set[T]) Len

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

func (Set[T]) Remove

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

func (Set[T]) String

func (s Set[T]) String() string

func (Set[T]) SubsetOf

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

func (Set[T]) SupersetOf

func (s Set[T]) SupersetOf(other Set[T]) bool

func (Set[T]) SymmetricDifference

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

func (Set[T]) Union

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

type StringSet

type StringSet struct {
	Set[string]
}

func NewStringSet

func NewStringSet(elements ...string) StringSet

func (*StringSet) Scan

func (s *StringSet) Scan(src interface{}) error

func (StringSet) Value

func (s StringSet) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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