common

package
v0.0.0-...-5cbc542 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterable

type Iterable interface {
	// Begin returns an Iterator pointing to the first object.
	Begin() Iterator

	// End returns an Iterator pointing to a theoretical past-the-end object.
	End() Iterator
}

Iterable represents a type which can be iterated.

type Iterator

type Iterator interface {
	// Next returns an iterator pointing to the next object.
	Next() Iterator

	// Value returns the value of the object pointed by the Iterator.
	Value() interface{}

	// Equals returns true if the Iterators point to the same object.
	Equals(r Iterator) bool
}

Iterator is a type which Iterable holds.

type IteratorDirection

type IteratorDirection uint8
const (
	FORWARD IteratorDirection = iota + 1
	BACKWARD
	BOTH
	NONE
)

type ReverseIterable

type ReverseIterable interface {
	// Rbegin returns an Iterator pointing to the last object.
	Rbegin() Iterator

	// Rend returns an Iterator pointing to a theoretical before-the-start object.
	Rend() Iterator
}

Jump to

Keyboard shortcuts

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