set

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Overview

Package set

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set string set

func (Set[T]) Add

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

func (Set[T]) Del

func (s Set[T]) Del(keyList ...T) Set[T]

func (Set[T]) Difference

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

Difference 差集

func (Set[T]) Empty

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

func (Set[K]) Has

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

func (Set[T]) Intersection

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

Intersection 交集

func (Set[T]) Size

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

func (Set[T]) ToList

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

func (Set[T]) Union

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

Union 并集

Jump to

Keyboard shortcuts

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