Documentation
¶
Index ¶
- type MapSet
- func (s *MapSet[V]) Add(value V) bool
- func (s *MapSet[V]) AddAll(other structs.Collection[V]) bool
- func (s *MapSet[V]) AddIterator(iter structs.Iterator[V]) bool
- func (s *MapSet[V]) Clear()
- func (s *MapSet[V]) Contains(value V) bool
- func (s *MapSet[V]) ContainsAll(other structs.Collection[V]) bool
- func (s *MapSet[V]) IsEmpty() bool
- func (s *MapSet[V]) Iterator() structs.Iterator[V]
- func (s *MapSet[V]) Remove(value V) bool
- func (s *MapSet[V]) RemoveAll(other structs.Collection[V]) bool
- func (s *MapSet[V]) RemoveIterator(iter structs.Iterator[V]) bool
- func (s *MapSet[V]) RetainAll(other structs.Collection[V]) bool
- func (s *MapSet[V]) Size() int
- func (s *MapSet[V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapSet ¶
type MapSet[V comparable] struct { // contains filtered or unexported fields }
MapSet is an implementation of a set which uses Go's map type internally. It requires a type which is comparable; equality functions cannot be used.
func From ¶
func From[V comparable](set map[V]struct{}) *MapSet[V]
func NewMapSet ¶
func NewMapSet[V comparable]() *MapSet[V]
func (*MapSet[V]) ContainsAll ¶
func (s *MapSet[V]) ContainsAll(other structs.Collection[V]) bool
func (*MapSet[V]) RemoveIterator ¶
Click to show internal directories.
Click to hide internal directories.