Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoNextElement error = fmt.Errorf("Next() called on empty iterator")
)
Functions ¶
This section is empty.
Types ¶
type LinkedIterator ¶
type LinkedIterator[T any] struct { // contains filtered or unexported fields }
func NewLinkedIterator ¶
func NewLinkedIterator[T any](start LinkedIteratorElement[T], isValidFunc func(LinkedIteratorElement[T]) bool) *LinkedIterator[T]
NewLinkedIterator returns a new LinkedIterator.
func (*LinkedIterator[T]) HasNext ¶
func (i *LinkedIterator[T]) HasNext() bool
func (*LinkedIterator[T]) Next ¶
func (i *LinkedIterator[T]) Next() T
type LinkedIteratorElement ¶
type LinkedIteratorElement[T any] interface { // Next returns the next element. Next() LinkedIteratorElement[T] // Value returns the value of the element. Value() T }
Click to show internal directories.
Click to hide internal directories.