Documentation
¶
Index ¶
- type Set
- func (s *Set[T]) Add(item ...T)
- func (s *Set[T]) AddFromAnother(another Set[T])
- func (s *Set[T]) AddFromSlice(items []T)
- func (s *Set[T]) Clone() Set[T]
- func (s *Set[T]) Contains(item T) bool
- func (s *Set[T]) Intersect(another Set[T])
- func (s *Set[T]) IsEqual(other Set[T]) bool
- func (s *Set[T]) IsSubSet(other Set[T]) bool
- func (s *Set[T]) Len() int
- func (s *Set[T]) Range(callback func(item T) bool)
- func (s *Set[T]) Remove(item T)
- func (s *Set[T]) ToSlice() []T
- func (s *Set[T]) Union(another Set[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 Define ¶
func Define[T comparable](items ...T) Set[T]
func New ¶
func New[T comparable](capacity int) Set[T]
func (*Set[T]) AddFromAnother ¶
func (*Set[T]) AddFromSlice ¶
func (s *Set[T]) AddFromSlice(items []T)
Click to show internal directories.
Click to hide internal directories.