Versions in this module Expand all Collapse all v3 v3.0.0 Sep 20, 2024 Changes in this version + func InsertSetFunc[T, E any](a Collection[T], b Collection[E], transform func(T) E) bool + func InsertSliceFunc[T, E any](col Collection[T], items []E, transform func(element E) T) bool + func SliceFunc[T, E any](s Collection[T], transform func(T) E) []E + type Collection interface + Contains func(T) bool + ContainsSlice func([]T) bool + Difference func(Collection[T]) Collection[T] + Empty func() bool + EqualSet func(Collection[T]) bool + EqualSlice func([]T) bool + EqualSliceSet func([]T) bool + Insert func(T) bool + InsertSet func(Collection[T]) bool + InsertSlice func([]T) bool + Intersect func(Collection[T]) Collection[T] + Items func() iter.Seq[T] + ProperSubset func(Collection[T]) bool + Remove func(T) bool + RemoveFunc func(func(T) bool) bool + RemoveSet func(Collection[T]) bool + RemoveSlice func([]T) bool + Size func() int + Slice func() []T + String func() string + StringFunc func(func(T) string) string + Subset func(Collection[T]) bool + Union func(Collection[T]) Collection[T] + type CompareFunc func(T, T) int + type Hash interface + type HashFunc func(T) H + func HasherFunc[T Hasher[H], H Hash]() HashFunc[T, H] + type HashSet struct + func HashSetFromFunc[T any, H Hash](items []T, hash HashFunc[T, H]) *HashSet[T, H] + func HashSetFrom[T Hasher[H], H Hash](items []T) *HashSet[T, H] + func NewHashSetFunc[T any, H Hash](size int, fn HashFunc[T, H]) *HashSet[T, H] + func NewHashSet[T Hasher[H], H Hash](size int) *HashSet[T, H] + func (s *HashSet[T, H]) Contains(item T) bool + func (s *HashSet[T, H]) ContainsSlice(items []T) bool + func (s *HashSet[T, H]) Copy() *HashSet[T, H] + func (s *HashSet[T, H]) Difference(col Collection[T]) Collection[T] + func (s *HashSet[T, H]) Empty() bool + func (s *HashSet[T, H]) Equal(o *HashSet[T, H]) bool + func (s *HashSet[T, H]) EqualSet(col Collection[T]) bool + func (s *HashSet[T, H]) EqualSlice(items []T) bool + func (s *HashSet[T, H]) EqualSliceSet(items []T) bool + func (s *HashSet[T, H]) Insert(item T) bool + func (s *HashSet[T, H]) InsertSet(col Collection[T]) bool + func (s *HashSet[T, H]) InsertSlice(items []T) bool + func (s *HashSet[T, H]) Intersect(col Collection[T]) Collection[T] + func (s *HashSet[T, H]) Items() iter.Seq[T] + func (s *HashSet[T, H]) MarshalJSON() ([]byte, error) + func (s *HashSet[T, H]) ProperSubset(col Collection[T]) bool + func (s *HashSet[T, H]) Remove(item T) bool + func (s *HashSet[T, H]) RemoveFunc(f func(item T) bool) bool + func (s *HashSet[T, H]) RemoveSet(col Collection[T]) bool + func (s *HashSet[T, H]) RemoveSlice(items []T) bool + func (s *HashSet[T, H]) Size() int + func (s *HashSet[T, H]) Slice() []T + func (s *HashSet[T, H]) String() string + func (s *HashSet[T, H]) StringFunc(f func(element T) string) string + func (s *HashSet[T, H]) Subset(col Collection[T]) bool + func (s *HashSet[T, H]) Union(col Collection[T]) Collection[T] + func (s *HashSet[T, H]) UnmarshalJSON(data []byte) error + type Hasher interface + Hash func() H + type Set struct + func FromFunc[A any, T comparable](items []A, conversion func(A) T) *Set[T] + func From[T comparable](items []T) *Set[T] + func New[T comparable](size int) *Set[T] + func (s *Set[T]) Contains(item T) bool + func (s *Set[T]) ContainsSlice(items []T) bool + func (s *Set[T]) Copy() *Set[T] + func (s *Set[T]) Difference(col Collection[T]) Collection[T] + func (s *Set[T]) Empty() bool + func (s *Set[T]) Equal(o *Set[T]) bool + func (s *Set[T]) EqualSet(col Collection[T]) bool + func (s *Set[T]) EqualSlice(items []T) bool + func (s *Set[T]) EqualSliceSet(items []T) bool + func (s *Set[T]) Insert(item T) bool + func (s *Set[T]) InsertSet(col Collection[T]) bool + func (s *Set[T]) InsertSlice(items []T) bool + func (s *Set[T]) Intersect(col Collection[T]) Collection[T] + func (s *Set[T]) Items() iter.Seq[T] + func (s *Set[T]) MarshalJSON() ([]byte, error) + func (s *Set[T]) ProperSubset(col Collection[T]) bool + func (s *Set[T]) Remove(item T) bool + func (s *Set[T]) RemoveFunc(f func(T) bool) bool + func (s *Set[T]) RemoveSet(col Collection[T]) bool + func (s *Set[T]) RemoveSlice(items []T) bool + func (s *Set[T]) Size() int + func (s *Set[T]) Slice() []T + func (s *Set[T]) String() string + func (s *Set[T]) StringFunc(f func(element T) string) string + func (s *Set[T]) Subset(col Collection[T]) bool + func (s *Set[T]) Union(col Collection[T]) Collection[T] + func (s *Set[T]) UnmarshalJSON(data []byte) error + type TreeNodeVisit func(*node[T]) (next bool) + type TreeSet struct + func NewTreeSet[T any](compare CompareFunc[T]) *TreeSet[T] + func TreeSetFrom[T any](items []T, compare CompareFunc[T]) *TreeSet[T] + func (s *TreeSet[T]) Above(item T) *TreeSet[T] + func (s *TreeSet[T]) AboveEqual(item T) *TreeSet[T] + func (s *TreeSet[T]) Below(item T) *TreeSet[T] + func (s *TreeSet[T]) BelowEqual(item T) *TreeSet[T] + func (s *TreeSet[T]) BottomK(n int) []T + func (s *TreeSet[T]) Contains(item T) bool + func (s *TreeSet[T]) ContainsSlice(items []T) bool + func (s *TreeSet[T]) Copy() *TreeSet[T] + func (s *TreeSet[T]) Difference(col Collection[T]) Collection[T] + func (s *TreeSet[T]) Empty() bool + func (s *TreeSet[T]) Equal(o *TreeSet[T]) bool + func (s *TreeSet[T]) EqualSet(col Collection[T]) bool + func (s *TreeSet[T]) EqualSlice(items []T) bool + func (s *TreeSet[T]) EqualSliceSet(items []T) bool + func (s *TreeSet[T]) FirstAbove(item T) (T, bool) + func (s *TreeSet[T]) FirstAboveEqual(item T) (T, bool) + func (s *TreeSet[T]) FirstBelow(item T) (T, bool) + func (s *TreeSet[T]) FirstBelowEqual(item T) (T, bool) + func (s *TreeSet[T]) Insert(item T) bool + func (s *TreeSet[T]) InsertSet(col Collection[T]) bool + func (s *TreeSet[T]) InsertSlice(items []T) bool + func (s *TreeSet[T]) Intersect(col Collection[T]) Collection[T] + func (s *TreeSet[T]) Items() iter.Seq[T] + func (s *TreeSet[T]) MarshalJSON() ([]byte, error) + func (s *TreeSet[T]) Max() T + func (s *TreeSet[T]) Min() T + func (s *TreeSet[T]) ProperSubset(col Collection[T]) bool + func (s *TreeSet[T]) Remove(item T) bool + func (s *TreeSet[T]) RemoveFunc(f func(T) bool) bool + func (s *TreeSet[T]) RemoveSet(col Collection[T]) bool + func (s *TreeSet[T]) RemoveSlice(items []T) bool + func (s *TreeSet[T]) Size() int + func (s *TreeSet[T]) Slice() []T + func (s *TreeSet[T]) String() string + func (s *TreeSet[T]) StringFunc(f func(T) string) string + func (s *TreeSet[T]) Subset(col Collection[T]) bool + func (s *TreeSet[T]) TopK(n int) []T + func (s *TreeSet[T]) Union(col Collection[T]) Collection[T] + func (s *TreeSet[T]) UnmarshalJSON(data []byte) error v3.0.0-alpha.1 Aug 16, 2024 Other modules containing this package github.com/hashicorp/go-set github.com/hashicorp/go-set/v2