container

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyIterator = emptyIterator{}

Functions

func Contains

func Contains(c Container, v interface{}) bool

func Len

func Len(c Container) int

func Sort

func Sort(begin, end RandomAccessIterator, less CompareFunc, native []int)

Types

type Array

type Array interface {
	Container
}

type CompareFunc

type CompareFunc func(left, right interface{}) bool

type Container

type Container interface {
	Len() int
	Iter() Iterator
	Contains(interface{}) bool
}

type Iterator

type Iterator interface {
	Next() (k, v interface{})
}

Iterator ...

type Map

type Map interface {
	Container
}

type RandomAccessIterator

type RandomAccessIterator interface {
	Iterator
	Add(n int) RandomAccessIterator
	Diff(iter RandomAccessIterator) int
	Get() interface{}
	Set(v interface{})

	Value(i int) reflect.Value
}

func IterFromSlice

func IterFromSlice(slice interface{}) RandomAccessIterator

$zcheck: slice IS SLICE

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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