Documentation ¶
Index ¶
- type HashSet
- func (h HashSet[K]) Add(v K) bool
- func (h HashSet[K]) AddAll(src collection.Collection[K]) bool
- func (h HashSet[K]) AddSlice(items ...K) bool
- func (h HashSet[K]) Clear()
- func (h HashSet[K]) Contains(v K) bool
- func (h HashSet[K]) ContainsAll(src collection.Collection[K]) bool
- func (h HashSet[K]) ContainsSlice(src ...K) bool
- func (h HashSet[K]) ForEach(predicateFunc collection.IterablePredicateFunc[K])
- func (h HashSet[K]) IsEmpty() bool
- func (h HashSet[K]) Len() int
- func (h HashSet[K]) NewIterator() collection.Iterator[K]
- func (h HashSet[K]) ToSlice() []K
- type Iterator
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[K comparable] map[K]struct{}
func (HashSet[K]) AddAll ¶
func (h HashSet[K]) AddAll(src collection.Collection[K]) bool
func (HashSet[K]) ContainsAll ¶
func (h HashSet[K]) ContainsAll(src collection.Collection[K]) bool
func (HashSet[K]) ContainsSlice ¶
func (HashSet[K]) ForEach ¶
func (h HashSet[K]) ForEach(predicateFunc collection.IterablePredicateFunc[K])
func (HashSet[K]) NewIterator ¶
func (h HashSet[K]) NewIterator() collection.Iterator[K]
type Iterator ¶
type Iterator[K comparable] struct { // contains filtered or unexported fields }
func NewIterator ¶
func NewIterator[K comparable](src Set[K]) *Iterator[K]
func (*Iterator[K]) HasPrevious ¶
type Set ¶
type Set[K comparable] interface { collection.ComparableCollection[K] }
Click to show internal directories.
Click to hide internal directories.