iterator

package
v2.0.0-...-cfe7cf8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitIterator

type BitIterator uintptr

BitIterator represents a set of one-bits and the ability to enumerate them.

func (BitIterator) Count

func (b BitIterator) Count() int

func (BitIterator) Has

func (b BitIterator) Has(i int) bool

func (BitIterator) Index

func (b BitIterator) Index() int

func (BitIterator) Next

func (b BitIterator) Next() BitIterator

func (BitIterator) String

func (b BitIterator) String() string

func (BitIterator) With

func (b BitIterator) With(i int) BitIterator

func (BitIterator) Without

func (b BitIterator) Without(i int) BitIterator

type Iterator

type Iterator[T any] interface {
	Next() bool
	Value() T
}

Iterator provides for iterating over a Set.

func Empty

func Empty[T any]() Iterator[T]

Empty is the empty iterator.

type MapIterator

type MapIterator[T any] struct {
	// contains filtered or unexported fields
}

func Map

func Map[T any](i Iterator[T], m func(v T) T) *MapIterator[T]

func (MapIterator[T]) Next

func (m MapIterator[T]) Next() bool

func (MapIterator[T]) Value

func (m MapIterator[T]) Value() T

type SliceIterator

type SliceIterator[T any] struct {
	// contains filtered or unexported fields
}

func NewSliceIterator

func NewSliceIterator[T any](slice []T) *SliceIterator[T]

func (*SliceIterator[T]) Next

func (i *SliceIterator[T]) Next() bool

func (*SliceIterator[T]) Value

func (i *SliceIterator[T]) Value() T

Jump to

Keyboard shortcuts

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