Documentation
¶
Index ¶
- type SafeSet
- func (s *SafeSet[K]) Add(value K)
- func (s *SafeSet[K]) Copy() *SafeSet[K]
- func (s *SafeSet[K]) Delete(value K)
- func (s *SafeSet[K]) Difference(other *SafeSet[K]) *SafeSet[K]
- func (s *SafeSet[K]) Eq(other *SafeSet[K]) bool
- func (s *SafeSet[K]) Has(value K) bool
- func (s *SafeSet[K]) Intersection(other *SafeSet[K]) *SafeSet[K]
- func (s *SafeSet[K]) Iter(callback func(value K))
- func (s *SafeSet[K]) IterIndex(callback func(value K, i int))
- func (s *SafeSet[K]) List() []K
- func (s *SafeSet[K]) Size() int
- func (s *SafeSet[K]) String() string
- func (s *SafeSet[K]) Subtract(other *SafeSet[K]) *SafeSet[K]
- func (s *SafeSet[K]) Union(other *SafeSet[K]) *SafeSet[K]
- type Set
- func (s *Set[K]) Add(value K)
- func (s *Set[K]) Copy() *Set[K]
- func (s *Set[K]) Delete(value K)
- func (s *Set[K]) Difference(other *Set[K]) *Set[K]
- func (s *Set[K]) Eq(other *Set[K]) bool
- func (s *Set[K]) Has(value K) bool
- func (s *Set[K]) Intersection(other *Set[K]) *Set[K]
- func (s *Set[K]) Iter(callback func(value K))
- func (s *Set[K]) IterIndex(callback func(value K, i int))
- func (s *Set[K]) List() []K
- func (s *Set[K]) Size() int
- func (s *Set[K]) String() string
- func (s *Set[K]) Subtract(other *Set[K]) *Set[K]
- func (s *Set[K]) Union(other *Set[K]) *Set[K]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeSet ¶ added in v1.0.1
type SafeSet[K comparable] struct { // contains filtered or unexported fields }
func FromListSafe ¶ added in v1.0.1
func FromListSafe[K comparable](list []K) *SafeSet[K]
func NewSafe ¶ added in v1.0.1
func NewSafe[K comparable]() *SafeSet[K]
func (*SafeSet[K]) Difference ¶ added in v1.0.1
func (*SafeSet[K]) Intersection ¶ added in v1.0.1
type Set ¶
type Set[K comparable] struct { // contains filtered or unexported fields }
func FromList ¶
func FromList[K comparable](list []K) *Set[K]
func New ¶
func New[K comparable]() *Set[K]
func (*Set[K]) Difference ¶
func (*Set[K]) Intersection ¶
Click to show internal directories.
Click to hide internal directories.