Documentation ¶
Index ¶
- type ISet
- type Set
- func (s Set[T]) Add(items ...T)
- func (s Set[T]) AddAll(set Set[T])
- func (s Set[T]) Clear() bool
- func (s Set[T]) Clone() Set[T]
- func (s Set[T]) Contains(items ...T) bool
- func (s Set[T]) ContainsAll(set Set[T]) bool
- func (s Set[T]) IsEmpty() bool
- func (s Set[T]) Len() int
- func (s Set[T]) Remove(items ...T) bool
- func (s Set[T]) RemoveAll(set Set[T]) bool
- func (s Set[T]) ToSlice() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func IntersectionSet ¶
func IntersectionSet[T comparable](s1, s2 Set[T]) Set[T]
IntersectionSet return s1 & s2
func NewSet ¶
func NewSet[T comparable](items ...T) Set[T]
func NewSetFromSlice ¶
func NewSetFromSlice[T comparable](slices ...[]T) Set[T]
func UnionSet ¶
func UnionSet[T comparable](sets ...Set[T]) Set[T]
UnionSet return union of all sets
func (Set[T]) ContainsAll ¶
Click to show internal directories.
Click to hide internal directories.