Documentation ¶
Index ¶
- type ArraySet
- func (s ArraySet[T]) Cardinality() int
- func (s ArraySet[T]) Clone() ArraySet[T]
- func (s ArraySet[T]) Contains(v T) bool
- func (s *ArraySet[T]) Exclude(vs ...T)
- func (s *ArraySet[T]) ExcludeSeq(seq seqs.Seq[T])
- func (s *ArraySet[T]) ExcludeSet(set sets.SetOf[T])
- func (s ArraySet[T]) ForEachUntil(fn func(T) bool)
- func (s *ArraySet[T]) Include(vs ...T)
- func (s *ArraySet[T]) IncludeSeq(seq seqs.Seq[T])
- func (s ArraySet[T]) Len() int
- func (s ArraySet[T]) WithEq(eq func(T, T) bool) ArraySet[T]
- func (s ArraySet[T]) WithItems(items []T) ArraySet[T]
- type Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArraySet ¶
func FromSlice ¶
func FromSlice[T comparable](vs []T) ArraySet[T]
func FromValues ¶
func FromValues[T comparable](vs ...T) ArraySet[T]
func (ArraySet[T]) Cardinality ¶
func (*ArraySet[T]) ExcludeSeq ¶
ExcludeSeq removes all items from the set that are found in the specified sequence.
NOTE: The current implementation is slower than calling Exclude(seqs.ToSlice(seq)) would be if converting the sequence to a slice is practical.
func (*ArraySet[T]) ExcludeSet ¶
ExcludeSet removes all items from the array set that are contained in the specified set.
func (ArraySet[T]) ForEachUntil ¶
func (*ArraySet[T]) IncludeSeq ¶
type Builder ¶
type Builder[T any] struct { // contains filtered or unexported fields }
func (Builder[T]) FromValues ¶
Click to show internal directories.
Click to hide internal directories.