Documentation ¶
Index ¶
- type Set
- func (ts *Set[K, T]) Add(t T) bool
- func (ts *Set[K, T]) AddAll(ats []T)
- func (ts *Set[K, T]) Copy() *Set[K, T]
- func (ts *Set[K, T]) GetKey(k K) T
- func (ts *Set[K, T]) Has(t T) bool
- func (ts *Set[K, T]) Len() int
- func (ts *Set[K, T]) Pop(i int) T
- func (ts *Set[K, T]) Remove(v T)
- func (ts *Set[K, T]) Slice() []T
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[K comparable, T any] struct { // contains filtered or unexported fields }
func NewIdentitySet ¶
func NewIdentitySet[T comparable](cap int) *Set[T, T]
func NewIdentitySetFrom ¶
func NewIdentitySetFrom[T comparable](vs []T) *Set[T, T]
func NewSetFrom ¶
func NewSetFrom[K comparable, T any](f func(T) K, vs []T) *Set[K, T]
Click to show internal directories.
Click to hide internal directories.