set

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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]) Add

func (s *MapSet[V]) Add(value V) bool

func (*MapSet[V]) AddAll

func (s *MapSet[V]) AddAll(other structs.Collection[V]) bool

func (*MapSet[V]) AddIterator

func (s *MapSet[V]) AddIterator(iter structs.Iterator[V]) bool

func (*MapSet[V]) Clear

func (s *MapSet[V]) Clear()

func (*MapSet[V]) Contains

func (s *MapSet[V]) Contains(value V) bool

func (*MapSet[V]) ContainsAll

func (s *MapSet[V]) ContainsAll(other structs.Collection[V]) bool

func (*MapSet[V]) IsEmpty

func (s *MapSet[V]) IsEmpty() bool

func (*MapSet[V]) Iterator

func (s *MapSet[V]) Iterator() structs.Iterator[V]

func (*MapSet[V]) Remove

func (s *MapSet[V]) Remove(value V) bool

func (*MapSet[V]) RemoveAll

func (s *MapSet[V]) RemoveAll(other structs.Collection[V]) bool

func (*MapSet[V]) RemoveIterator

func (s *MapSet[V]) RemoveIterator(iter structs.Iterator[V]) bool

func (*MapSet[V]) RetainAll

func (s *MapSet[V]) RetainAll(other structs.Collection[V]) bool

func (*MapSet[V]) Size

func (s *MapSet[V]) Size() int

func (*MapSet[V]) Values

func (s *MapSet[V]) Values() []V

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL