set

package
v0.0.0-...-525d511 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys[K comparable, V any](m map[K]V, cmp maputils.CompareFunc[K]) []K

Types

type Set

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

func KeySet

func KeySet[K comparable, V any](m map[K]V) Set[K]

func New

func New[K comparable](keys ...K) Set[K]

func (Set[K]) Add

func (s Set[K]) Add(keys ...K) Set[K]

func (Set[K]) AddAll

func (s Set[K]) AddAll(set Set[K]) Set[K]

func (Set[K]) AsArray

func (s Set[K]) AsArray() []K

func (Set[K]) Contains

func (s Set[K]) Contains(keys ...K) bool

func (Set[K]) Delete

func (s Set[K]) Delete(keys ...K) Set[K]

func (Set[K]) DeleteAll

func (s Set[K]) DeleteAll(set Set[K]) Set[K]

func (Set[K]) Has

func (s Set[K]) Has(key K) bool

Jump to

Keyboard shortcuts

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