Documentation ¶
Index ¶
- type HashSet
- func (hs *HashSet[T]) Add(e T)
- func (hs *HashSet[T]) AddAll(e ...T)
- func (hs *HashSet[T]) Clear()
- func (hs *HashSet[T]) Contains(e T) bool
- func (hs *HashSet[T]) ContainsAll(e ...T) bool
- func (hs *HashSet[T]) Copy() Set[T]
- func (hs *HashSet[T]) Intersection(s Set[T]) (Set[T], error)
- func (hs *HashSet[T]) IsEmpty() bool
- func (hs *HashSet[T]) Iterator() iterator.Iterator[T]
- func (hs *HashSet[T]) Remove(e T) error
- func (hs *HashSet[T]) RemoveAll(e ...T) error
- func (hs *HashSet[T]) RetainAll(e ...T) error
- func (hs *HashSet[T]) Size() int64
- func (hs *HashSet[T]) Union(s Set[T]) (Set[T], error)
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[T comparable] struct { // contains filtered or unexported fields }
func NewHashSet ¶
func NewHashSet[T comparable](e ...T) *HashSet[T]
func (*HashSet[T]) AddAll ¶
func (hs *HashSet[T]) AddAll(e ...T)
TODO: SHOULD IT THROW ERRO IF ARGS ARE EMPTY?
func (*HashSet[T]) ContainsAll ¶
type Set ¶
type Set[T comparable] interface { Add(e T) AddAll(e ...T) Clear() Contains(e T) bool ContainsAll(e ...T) bool Copy() Set[T] IsEmpty() bool Size() int64 Remove(e T) error RemoveAll(e ...T) error RetainAll(e ...T) error Iterator() iterator.Iterator[T] Union(s Set[T]) (Set[T], error) Intersection(s Set[T]) (Set[T], error) }
Click to show internal directories.
Click to hide internal directories.