Documentation
¶
Index ¶
- type MutableSet
- func (s *MutableSet[T]) Add(elements ...T) set.Set[T]
- func (s1 *MutableSet[T]) Difference(s2 set.Set[T]) set.Set[T]
- func (s *MutableSet[T]) Elements() []T
- func (s *MutableSet[T]) Equals(other set.Set[T]) bool
- func (s *MutableSet[T]) Has(item T) bool
- func (s1 *MutableSet[T]) Intersection(s2 set.Set[T]) set.Set[T]
- func (s *MutableSet[T]) IsEmpty() bool
- func (s *MutableSet[T]) IterElements() iter.Iterator[T]
- func (s *MutableSet[T]) Len() int
- func (s *MutableSet[T]) Remove(element T) set.Set[T]
- func (s *MutableSet[T]) String() string
- func (s1 *MutableSet[T]) SymmetricDifference(s2 set.Set[T]) set.Set[T]
- func (s1 *MutableSet[T]) Union(s2 set.Set[T]) set.Set[T]
- type SetIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutableSet ¶
type MutableSet[T comparable] struct { // contains filtered or unexported fields }
func Empty ¶
func Empty[T comparable]() *MutableSet[T]
func FromIterator ¶
func FromIterator[T comparable](iterator iter.Iterator[T]) *MutableSet[T]
func FromSlice ¶
func FromSlice[T comparable](items []T) *MutableSet[T]
func (*MutableSet[T]) Add ¶
func (s *MutableSet[T]) Add(elements ...T) set.Set[T]
func (*MutableSet[T]) Difference ¶
func (s1 *MutableSet[T]) Difference(s2 set.Set[T]) set.Set[T]
func (*MutableSet[T]) Elements ¶
func (s *MutableSet[T]) Elements() []T
func (*MutableSet[T]) Has ¶
func (s *MutableSet[T]) Has(item T) bool
func (*MutableSet[T]) Intersection ¶
func (s1 *MutableSet[T]) Intersection(s2 set.Set[T]) set.Set[T]
func (*MutableSet[T]) IsEmpty ¶
func (s *MutableSet[T]) IsEmpty() bool
func (*MutableSet[T]) IterElements ¶
func (s *MutableSet[T]) IterElements() iter.Iterator[T]
func (*MutableSet[T]) Len ¶
func (s *MutableSet[T]) Len() int
func (*MutableSet[T]) Remove ¶
func (s *MutableSet[T]) Remove(element T) set.Set[T]
func (*MutableSet[T]) String ¶
func (s *MutableSet[T]) String() string
func (*MutableSet[T]) SymmetricDifference ¶
func (s1 *MutableSet[T]) SymmetricDifference(s2 set.Set[T]) set.Set[T]
type SetIterator ¶
type SetIterator[T comparable] struct { // contains filtered or unexported fields }
func (*SetIterator[T]) Next ¶
func (setIter *SetIterator[T]) Next() option.Option[T]
Click to show internal directories.
Click to hide internal directories.