Documentation ¶
Index ¶
- type HashSet
- func (s *HashSet[T, K]) Add(items ...T)
- func (s *HashSet[T, K]) Clear()
- func (s *HashSet[T, K]) Clone() *HashSet[T, K]
- func (s *HashSet[T, K]) Complement(others ...HashSet[T, K])
- func (s HashSet[T, K]) Contains(item T) bool
- func (s HashSet[T, K]) ContainsAll(items ...T) bool
- func (s HashSet[T, K]) ContainsAny(items ...T) bool
- func (s *HashSet[T, K]) Delete(items ...T)
- func (s *HashSet[T, K]) Intersection(others ...HashSet[T, K]) *HashSet[T, K]
- func (s *HashSet[T, K]) Items() (res []T)
- func (s *HashSet[T, K]) Size() int
- func (s *HashSet[T, K]) Union(others ...HashSet[T, K])
- type Hasher
- type Set
- func (s *Set[T]) Add(items ...T)
- func (s *Set[T]) Clear()
- func (s *Set[T]) Clone() *Set[T]
- func (s *Set[T]) Complement(others ...Set[T])
- func (s Set[T]) Contains(item T) bool
- func (s Set[T]) ContainsAll(items ...T) bool
- func (s Set[T]) ContainsAny(items ...T) bool
- func (s *Set[T]) Delete(items ...T)
- func (s *Set[T]) Intersection(others ...Set[T]) *Set[T]
- func (s *Set[T]) Items() (res []T)
- func (s *Set[T]) Size() int
- func (s *Set[T]) Union(others ...Set[T])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[T any, K comparable] struct { // contains filtered or unexported fields }
func NewHashSet ¶
func NewHashSet[T any, K comparable](hash Hasher[T, K], vals ...T) *HashSet[T, K]
func (*HashSet[T, K]) Complement ¶
func (HashSet[T, K]) ContainsAll ¶
func (HashSet[T, K]) ContainsAny ¶
func (*HashSet[T, K]) Intersection ¶
type Hasher ¶
type Hasher[T any, K comparable] func(T) K
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T comparable](vals ...T) *Set[T]
func (*Set[T]) Complement ¶
func (Set[T]) ContainsAll ¶
func (Set[T]) ContainsAny ¶
func (*Set[T]) Intersection ¶
Click to show internal directories.
Click to hide internal directories.