Documentation
¶
Overview ¶
Package set
Index ¶
- type Set
- func (s Set[T]) Add(keyList ...T) Set[T]
- func (s Set[T]) Clear()
- func (s Set[T]) Copy() Set[T]
- func (s Set[T]) Del(keyList ...T) Set[T]
- func (s Set[T]) Difference(other Set[T]) Set[T]
- func (s Set[T]) Empty() bool
- func (s Set[K]) Has(key K) bool
- func (s Set[T]) Intersection(other Set[T]) Set[T]
- func (s Set[T]) Range(f func(item T) bool)
- func (s Set[T]) Size() int
- func (s Set[T]) SymmetricDifference(other Set[T]) Set[T]
- func (s Set[T]) ToList() []T
- func (s Set[T]) Union(other Set[T]) Set[T]
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 New ¶ added in v1.1.0
func New[T comparable]() Set[T]
func (Set[T]) SymmetricDifference ¶ added in v1.1.0
SymmetricDifference 异或集
Click to show internal directories.
Click to hide internal directories.