iterator

package
v0.0.0-...-f1100e8 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator[K comparable, V any] interface {
	ReadOnlyIterator[K, V]

	// Del removes the current element from the associated map.
	Del()

	// Replace replaces the current element with the given value.
	Set(value V)
}

type ReadOnlyIterator

type ReadOnlyIterator[K comparable, V any] interface {
	// HasNext returns true if the iterator has a next element.
	HasNext() bool

	// HasPrevious returns true if the iterator has previous elements.
	HasPrevious() bool

	// Next moves the iterator to the next element and returns it.
	Next() (K, V)

	// Previous moves the iterator to the previous element and returns it.
	Previous() (K, V)
}

Jump to

Keyboard shortcuts

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