Documentation
¶
Index ¶
- type Set
- func (s *Set[T]) Add(element T) *Set[T]
- func (s *Set[T]) Clear() *Set[T]
- func (s Set[T]) Copy() Set[T]
- func (s Set[T]) Difference(another Set[T]) Set[T]
- func (s *Set[T]) Discard(element T) bool
- func (s Set[T]) Empty() bool
- func (s Set[T]) Equal(another Set[T]) bool
- func (s Set[T]) Has(element T) bool
- func (s Set[T]) Intersection(another Set[T]) Set[T]
- func (s Set[T]) IsDisjoint(another Set[T]) bool
- func (s Set[T]) IsSubset(another Set[T]) bool
- func (s Set[T]) IsSuperset(another Set[T]) bool
- func (s Set[T]) MarshalJSON() ([]byte, error)
- func (s *Set[T]) Pop() (element T, err error)
- func (s Set[T]) Size() int
- func (s Set[T]) String() string
- func (s Set[T]) SymmetricDifference(another Set[T]) Set[T]
- func (s Set[T]) Union(another Set[T]) Set[T]
- func (s *Set[T]) UnmarshalJSON(data []byte) (err error)
- func (s *Set[T]) Update(another Set[T]) *Set[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] map[T]bool
func Of ¶
func Of[T comparable](elements ...T) Set[T]
func (Set[T]) Difference ¶
func (Set[T]) Intersection ¶
func (Set[T]) IsDisjoint ¶
func (Set[T]) IsSuperset ¶
func (Set[T]) MarshalJSON ¶
func (Set[T]) SymmetricDifference ¶
func (*Set[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.