iterator

package
Version: v8.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 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 Element

type Element interface{}

Element represents a slice element

type Elements

type Elements []Element

Elements represents a slice

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

Iterator represents a iterator

func New

func New(slice []Element) *Iterator

New returns a new iterator

func (*Iterator) CurrElem

func (g *Iterator) CurrElem() Element

CurrElem returns the current element

func (*Iterator) CurrPos

func (g *Iterator) CurrPos() int

CurrPos returns the current position

func (*Iterator) Len

func (g *Iterator) Len() int

Len returns the length

func (*Iterator) Next

func (g *Iterator) Next() bool

Next sets the next element

func (*Iterator) Prev

func (g *Iterator) Prev() bool

Prev sets the next element

func (*Iterator) Reset

func (g *Iterator) Reset()

Reset resets the iterator

func (*Iterator) SetPos

func (g *Iterator) SetPos(pos int) bool

SetPos sets the position

Source Files

Jump to

Keyboard shortcuts

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