Documentation ¶
Index ¶
- type HashSet
- func (inst *HashSet[T]) Add(val T)
- func (inst *HashSet[T]) All() iter.Seq[T]
- func (inst *HashSet[T]) Clear()
- func (inst *HashSet[T]) DifferenceMod(other *HashSet[T])
- func (inst *HashSet[T]) Equal(other HashSet[T]) bool
- func (inst *HashSet[T]) ForEach(handler func(v T))
- func (inst *HashSet[T]) Has(val T) bool
- func (inst *HashSet[T]) IntersectMod(other *HashSet[T])
- func (inst *HashSet[T]) Remove(val T)
- func (inst *HashSet[T]) Size() int
- func (inst *HashSet[T]) Slice() []T
- func (inst *HashSet[T]) SliceEx(in []T) (out []T)
- func (inst *HashSet[T]) UnionMod(other *HashSet[T])
- func (inst *HashSet[T]) Until(handler func(v T) bool)
- type Stack
- func (stack *Stack[T]) Depth() int
- func (stack *Stack[T]) Peek() (retr T, err error)
- func (stack *Stack[T]) PeekDefault(emptyValue T) (retr T)
- func (stack *Stack[T]) Pop() (retr T, err error)
- func (stack *Stack[T]) PopDefault(emptyValue T) (retr T)
- func (stack *Stack[T]) Push(value T)
- func (stack *Stack[T]) Reset()
- func (stack *Stack[T]) Swap(newValue T) (oldValue T, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[T comparable] struct { // contains filtered or unexported fields }
func NewHashSet ¶
func NewHashSet[T comparable](estimatedCard int) *HashSet[T]
func (*HashSet[T]) DifferenceMod ¶
func (*HashSet[T]) IntersectMod ¶
type Stack ¶
type Stack[T any] struct { Items []T }
func NewStackSize ¶
func (*Stack[T]) PeekDefault ¶
func (stack *Stack[T]) PeekDefault(emptyValue T) (retr T)
func (*Stack[T]) PopDefault ¶
func (stack *Stack[T]) PopDefault(emptyValue T) (retr T)
Click to show internal directories.
Click to hide internal directories.