data

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice

func Slice(s Iterable) []interface{}

func Sort

func Sort(data []interface{}, cmp CompareFunction)

func SortIndexed

func SortIndexed(data []interface{}, cmp CompareIndexedFunction)

func SortView

func SortView(data []interface{}, mapping []int, cmp CompareFunction)

func StringArraySlice

func StringArraySlice(s Iterable) [][]string

Types

type Appender

type Appender interface {
	Append(interface{}) ListElement
}

type CompareFunction

type CompareFunction func(interface{}, interface{}) int

type CompareIndexedFunction

type CompareIndexedFunction func(int, interface{}, int, interface{}) int

type DLL

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

func NewDLL

func NewDLL(p interface{}) *DLL

func (*DLL) Append

func (this *DLL) Append(d *DLL)

func (*DLL) Get

func (this *DLL) Get() interface{}

func (*DLL) Next

func (this *DLL) Next() *DLL

func (*DLL) Prev

func (this *DLL) Prev() *DLL

func (*DLL) Remove

func (this *DLL) Remove()

func (*DLL) Set

func (this *DLL) Set(p interface{})

type DLLRoot

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

func (*DLLRoot) Append

func (this *DLLRoot) Append(d *DLL)

func (*DLLRoot) DLL

func (this *DLLRoot) DLL() *DLL

func (*DLLRoot) Iterator

func (this *DLLRoot) Iterator() Iterator

func (*DLLRoot) New

func (this *DLLRoot) New(p interface{}) *DLLRoot

func (*DLLRoot) Next

func (this *DLLRoot) Next() *DLL

type ElementIterator

type ElementIterator interface {
	HasNext() bool
	NextElement() ListElement
}

type IndexedAccess

type IndexedAccess interface {
	Len() int
	Get(int) interface{}
}

type IndexedIterator

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

func NewIndexedIterator

func NewIndexedIterator(a IndexedAccess) *IndexedIterator

func NewSliceIterator

func NewSliceIterator(slice []interface{}) *IndexedIterator

func (*IndexedIterator) HasNext

func (this *IndexedIterator) HasNext() bool

func (*IndexedIterator) Next

func (this *IndexedIterator) Next() interface{}

func (*IndexedIterator) Reset

func (this *IndexedIterator) Reset()

type IndexedSliceAccess

type IndexedSliceAccess []interface{}

func (*IndexedSliceAccess) Add

func (this *IndexedSliceAccess) Add(elems ...interface{}) *IndexedSliceAccess

func (IndexedSliceAccess) Copy

func (IndexedSliceAccess) Get

func (this IndexedSliceAccess) Get(i int) interface{}

func (IndexedSliceAccess) Iterator

func (this IndexedSliceAccess) Iterator() Iterator

func (IndexedSliceAccess) Len

func (this IndexedSliceAccess) Len() int

func (*IndexedSliceAccess) Move

func (this *IndexedSliceAccess) Move(i, j, k int) *IndexedSliceAccess

Move [i:j] to [k:].

func (*IndexedSliceAccess) Remove

func (this *IndexedSliceAccess) Remove(i int) *IndexedSliceAccess

func (IndexedSliceAccess) Sort

func (IndexedSliceAccess) SortIndexed

type Iterable

type Iterable interface {
	Iterator() Iterator
}

type Iterator

type Iterator interface {
	HasNext() bool
	Next() interface{}
}

func ElementIteratorAsIterator

func ElementIteratorAsIterator(i ElementIterator) Iterator

func NewMappedIterator

func NewMappedIterator(iter Iterator, mapping MappingFunction) Iterator

type LinkedList

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

func NewLinkedList

func NewLinkedList() *LinkedList

func (*LinkedList) Append

func (ll *LinkedList) Append(e interface{}) ListElement

func (*LinkedList) ElementIterator

func (ll *LinkedList) ElementIterator() ElementIterator

func (*LinkedList) Iterator

func (ll *LinkedList) Iterator() Iterator

func (*LinkedList) New

func (ll *LinkedList) New() *LinkedList

type ListElement

type ListElement interface {
	Set(interface{})
	Get() interface{}
	Append(interface{}) ListElement
	Insert(interface{}) ListElement
}

type MappedIterator

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

func (*MappedIterator) Next

func (mi *MappedIterator) Next() interface{}

type MappingFunction

type MappingFunction func(interface{}) interface{}

type ResettableIterator

type ResettableIterator interface {
	HasNext() bool
	Next() interface{}
	Reset()
}

Jump to

Keyboard shortcuts

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