Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseSet ¶
type BaseSet[E comparable] map[E]struct{}
func NewSet ¶
func NewSet[E comparable](s ...E) BaseSet[E]
type OrderedSet ¶
type OrderedSet[E comparable] struct { // contains filtered or unexported fields }
func NewOrderedSet ¶
func NewOrderedSet[E comparable](elements ...E) *OrderedSet[E]
func (*OrderedSet[E]) Add ¶
func (s *OrderedSet[E]) Add(e ...E)
func (*OrderedSet[E]) Clear ¶
func (s *OrderedSet[E]) Clear()
func (*OrderedSet[E]) Contains ¶
func (s *OrderedSet[E]) Contains(e E) bool
func (*OrderedSet[E]) Len ¶
func (s *OrderedSet[E]) Len() int
func (*OrderedSet[E]) Remove ¶
func (s *OrderedSet[E]) Remove(e E)
func (*OrderedSet[E]) Values ¶
func (s *OrderedSet[E]) Values() []E
type Set ¶
type Set[E comparable] interface { Contains(e E) bool Add(e ...E) Remove(e E) Clear() Values() []E Len() int }
Click to show internal directories.
Click to hide internal directories.