set

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoundSet

type BoundSet[T ordered] struct {
	// contains filtered or unexported fields
}

func NewBoundSet

func NewBoundSet[T ordered](min, max T, items ...T) *BoundSet[T]

func (*BoundSet[T]) Add

func (l *BoundSet[T]) Add(items ...T) *BoundSet[T]

func (*BoundSet[T]) AddRange

func (l *BoundSet[T]) AddRange(min, max T)

func (*BoundSet[T]) Delete

func (l *BoundSet[T]) Delete(items ...T) *BoundSet[T]

func (*BoundSet[T]) Has

func (l *BoundSet[T]) Has(v T) bool

func (*BoundSet[T]) String

func (l *BoundSet[T]) String() string

type Set

type Set[T comparable] map[T]struct{}

func New

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

func (Set[T]) Add

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

func (Set[T]) Delete

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

func (Set[T]) Equal

func (s Set[T]) Equal(e Set[T]) bool

func (Set[T]) Has

func (s Set[T]) Has(v T) bool

func (Set[T]) String

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

Jump to

Keyboard shortcuts

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