Documentation
¶
Index ¶
- type Set
- func (s *Set) Add(items ...uint8) *Set
- func (s *Set) Clear() *Set
- func (s *Set) Clone() *Set
- func (s *Set) Contains(items ...uint8) bool
- func (s *Set) ContainsAny(items ...uint8) bool
- func (s *Set) Delete(items ...uint8) *Set
- func (s *Set) Difference(others ...*Set) *Set
- func (s *Set) Equal(other *Set) bool
- func (s *Set) Filter(f func(uint8) bool) *Set
- func (s *Set) FilterItems(f func(uint8) bool) (res []uint8)
- func (s *Set) Intersection(others ...*Set) *Set
- func (s *Set) Items() (res []uint8)
- func (s *Set) Size() int
- func (s *Set) Union(others ...*Set) *Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewIntersection ¶
Create a new set that is the intersection of all provided sets
func (*Set) ContainsAny ¶
Check if the set contains any of the given items
func (*Set) Difference ¶ added in v0.12.1
Difference removes items that are in the other sets. This mutates the set.
func (*Set) Filter ¶
Filter removes all items from the set that do not match the given filter function. This mutates the set.
func (*Set) FilterItems ¶
FilterItems returns a slice of items from the set that match the given filter function.
func (*Set) Intersection ¶
Intersection will reduce this set to the items that are present in this set and the other sets. This mutates the set.
Click to show internal directories.
Click to hide internal directories.