Documentation
¶
Index ¶
- type AbstractSet
- func (s *AbstractSet[T]) Add(value T)
- func (s *AbstractSet[T]) Contains(value T) bool
- func (s *AbstractSet[T]) Copy() Set[T]
- func (s *AbstractSet[T]) Difference(other Set[T]) Set[T]
- func (s *AbstractSet[T]) Intersection(other Set[T]) Set[T]
- func (s *AbstractSet[T]) IsSubset(other Set[T]) bool
- func (s *AbstractSet[T]) IsSubsetOf(other Set[T]) bool
- func (s *AbstractSet[T]) IsSuperset(other Set[T]) bool
- func (s *AbstractSet[T]) IsSupersetOf(other Set[T]) bool
- func (s *AbstractSet[T]) Remove(value T)
- func (s *AbstractSet[T]) SymmetricDifference(other Set[T]) Set[T]
- func (s *AbstractSet[T]) Union(other Set[T]) Set[T]
- func (s *AbstractSet[T]) Values() []T
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractSet ¶
type AbstractSet[T comparable] struct { // contains filtered or unexported fields }
func (*AbstractSet[T]) Add ¶
func (s *AbstractSet[T]) Add(value T)
func (*AbstractSet[T]) Contains ¶
func (s *AbstractSet[T]) Contains(value T) bool
func (*AbstractSet[T]) Copy ¶
func (s *AbstractSet[T]) Copy() Set[T]
func (*AbstractSet[T]) Difference ¶
func (s *AbstractSet[T]) Difference(other Set[T]) Set[T]
func (*AbstractSet[T]) Intersection ¶
func (s *AbstractSet[T]) Intersection(other Set[T]) Set[T]
func (*AbstractSet[T]) IsSubset ¶
func (s *AbstractSet[T]) IsSubset(other Set[T]) bool
func (*AbstractSet[T]) IsSubsetOf ¶
func (s *AbstractSet[T]) IsSubsetOf(other Set[T]) bool
func (*AbstractSet[T]) IsSuperset ¶
func (s *AbstractSet[T]) IsSuperset(other Set[T]) bool
func (*AbstractSet[T]) IsSupersetOf ¶
func (s *AbstractSet[T]) IsSupersetOf(other Set[T]) bool
func (*AbstractSet[T]) Remove ¶
func (s *AbstractSet[T]) Remove(value T)
func (*AbstractSet[T]) SymmetricDifference ¶
func (s *AbstractSet[T]) SymmetricDifference(other Set[T]) Set[T]
func (*AbstractSet[T]) Union ¶
func (s *AbstractSet[T]) Union(other Set[T]) Set[T]
func (*AbstractSet[T]) Values ¶
func (s *AbstractSet[T]) Values() []T
type Set ¶
type Set[T comparable] interface { Add(value T) Values() []T Contains(value T) bool Remove(value T) Union(other Set[T]) Set[T] Intersection(other Set[T]) Set[T] Difference(other Set[T]) Set[T] SymmetricDifference(other Set[T]) Set[T] IsSubsetOf(other Set[T]) bool IsSupersetOf(other Set[T]) bool Copy() Set[T] }
func NewSet ¶
func NewSet[T comparable]() Set[T]
func NewSetWithValues ¶
func NewSetWithValues[T comparable](init *[]T) Set[T]
Click to show internal directories.
Click to hide internal directories.