collection

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] interface {
	Put(key K, value V)
	Get(key K) (value V, found bool)
	Remove(key K)
	Keys() []K
	Empty() bool
	Size() int
	Clear()
	Values() []V
	String() string
}

func NewVisibleMap

func NewVisibleMap[K comparable, V any]() Map[K, V]

type Set added in v0.13.1

type Set[T constraints.Ordered] interface {
	Add(t T)
	Remove(t T)
	Contains(t T) bool
	Count() int
	IsEmpty() bool
	GetSorted() []T
	Complement(other Set[T]) Set[T]
}

func NewSet added in v0.13.1

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

func NewSetFrom added in v0.13.1

func NewSetFrom[T constraints.Ordered](i []T) Set[T]

Jump to

Keyboard shortcuts

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