linkedset

package
v0.0.0-...-ec0d933 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithCapacity

func WithCapacity(capacity int) Option

type Options

type Options struct {
	Capacity int
}

type Set

type Set[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K comparable](options ...Option) *Set[K, K]

func NewFunc

func NewFunc[K comparable, V any](keyFunc func(V) K, options ...Option) *Set[K, V]

func (*Set[K, V]) Add

func (h *Set[K, V]) Add(values ...V)

func (*Set[K, V]) Clear

func (h *Set[K, V]) Clear()

func (*Set[K, V]) Clone

func (h *Set[K, V]) Clone() *Set[K, V]

func (*Set[K, V]) Contains

func (h *Set[K, V]) Contains(value V) bool

func (*Set[K, V]) Delete

func (h *Set[K, V]) Delete(value V) bool

func (*Set[K, V]) Size

func (h *Set[K, V]) Size() int

func (*Set[K, V]) String

func (h *Set[K, V]) String() string

func (*Set[K, V]) Values

func (h *Set[K, V]) Values() iter.Seq[V]

Jump to

Keyboard shortcuts

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