set

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSet

type HashSet[K comparable] map[K]struct{}

func (HashSet[K]) Add

func (h HashSet[K]) Add(v K) bool

func (HashSet[K]) AddAll

func (h HashSet[K]) AddAll(src collection.Collection[K]) bool

func (HashSet[K]) AddSlice

func (h HashSet[K]) AddSlice(items ...K) bool

func (HashSet[K]) Clear

func (h HashSet[K]) Clear()

func (HashSet[K]) Contains

func (h HashSet[K]) Contains(v K) bool

func (HashSet[K]) ContainsAll

func (h HashSet[K]) ContainsAll(src collection.Collection[K]) bool

func (HashSet[K]) ContainsSlice

func (h HashSet[K]) ContainsSlice(src ...K) bool

func (HashSet[K]) ForEach

func (h HashSet[K]) ForEach(predicateFunc collection.IterablePredicateFunc[K])

func (HashSet[K]) IsEmpty

func (h HashSet[K]) IsEmpty() bool

func (HashSet[K]) Len

func (h HashSet[K]) Len() int

func (HashSet[K]) NewIterator

func (h HashSet[K]) NewIterator() collection.Iterator[K]

func (HashSet[K]) ToSlice

func (h HashSet[K]) ToSlice() []K

type Iterator

type Iterator[K comparable] struct {
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator[K comparable](src Set[K]) *Iterator[K]

func (*Iterator[K]) HasNext

func (i *Iterator[K]) HasNext() bool

func (*Iterator[K]) HasPrevious

func (i *Iterator[K]) HasPrevious() bool

func (*Iterator[K]) Next

func (i *Iterator[K]) Next() K

func (*Iterator[K]) Previous

func (i *Iterator[K]) Previous() K

func (*Iterator[K]) Reset

func (i *Iterator[K]) Reset()

type Set

type Set[K comparable] interface {
	collection.ComparableCollection[K]
}

Jump to

Keyboard shortcuts

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