Documentation
¶
Index ¶
- type Set
- func (s Set[T]) Add(element T)
- func (s Set[T]) Contains(element T) bool
- func (s Set[T]) ContainsAll(other Set[T]) bool
- func (s Set[T]) ContainsSome(other Set[T]) bool
- func (s Set[T]) Copy() Set[T]
- func (s Set[T]) Difference(other Set[T]) Set[T]
- func (s Set[T]) Equals(other Set[T]) bool
- func (s Set[T]) Intersection(other Set[T]) Set[T]
- func (s Set[T]) MarshalJSON() ([]byte, error)
- func (s Set[T]) Remove(element T)
- func (s Set[T]) ToSlice() []T
- func (s Set[T]) Union(other Set[T]) Set[T]
- func (s *Set[T]) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
func New ¶
func New[T comparable]() Set[T]
func NewFromMap ¶
func NewFromMap[T comparable, V any](items map[T]V) Set[T]
func NewFromSlice ¶
func NewFromSlice[T comparable](items []T) Set[T]
func NewWithItems ¶
func NewWithItems[T comparable](items ...T) Set[T]
func (Set[T]) ContainsAll ¶
func (Set[T]) ContainsSome ¶
func (Set[T]) Difference ¶
func (Set[T]) Intersection ¶
func (Set[T]) MarshalJSON ¶
func (*Set[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.