Documentation ¶ Index ¶ type Set func GenerateNewSet[T any](slice []interface{}, f func(interface{}) *T) (*Set[T], error) func NewSet[T any]() *Set[T] func (_self *Set[T]) Add(t *T) bool func (_self *Set[T]) Clear() func (_self *Set[T]) Contains(t *T) bool func (_self *Set[T]) IsEmpty() bool func (_self *Set[T]) Merge(other *Set[T]) func (_self *Set[T]) Range(f func(*T) bool) func (_self *Set[T]) Remove(t *T) func (_self *Set[T]) Size() int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Set ¶ type Set[T any] struct { // contains filtered or unexported fields } func GenerateNewSet ¶ func GenerateNewSet[T any](slice []interface{}, f func(interface{}) *T) (*Set[T], error) func NewSet ¶ func NewSet[T any]() *Set[T] func (*Set[T]) Add ¶ func (_self *Set[T]) Add(t *T) bool func (*Set[T]) Clear ¶ func (_self *Set[T]) Clear() func (*Set[T]) Contains ¶ func (_self *Set[T]) Contains(t *T) bool func (*Set[T]) IsEmpty ¶ func (_self *Set[T]) IsEmpty() bool func (*Set[T]) Merge ¶ func (_self *Set[T]) Merge(other *Set[T]) func (*Set[T]) Range ¶ func (_self *Set[T]) Range(f func(*T) bool) func (*Set[T]) Remove ¶ func (_self *Set[T]) Remove(t *T) func (*Set[T]) Size ¶ func (_self *Set[T]) Size() int Source Files ¶ View all Source files set.go Click to show internal directories. Click to hide internal directories.