list

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayList

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

Define ArrayList struct

func NewArrayList

func NewArrayList() *ArrayList

create new empty List

func (*ArrayList) Add

func (arrayList *ArrayList) Add(e gotypes.Element) *ArrayList

add element

func (*ArrayList) Clear

func (arrayList *ArrayList) Clear()

clear list

func (*ArrayList) Filter

func (arrayList *ArrayList) Filter(filterFn func(e *gotypes.Element) bool) *ArrayList

filter function

func (*ArrayList) ForEach

func (arrayList *ArrayList) ForEach(fn func(e *gotypes.Element))

foreach function

func (*ArrayList) Get

func (arrayList *ArrayList) Get(index int) *gotypes.Element

get index element

func (*ArrayList) Map

func (arrayList *ArrayList) Map(mapFn func(e *gotypes.Element) gotypes.Element) *ArrayList

map function

func (*ArrayList) MatchAll

func (arrayList *ArrayList) MatchAll(matchAllFn func(e *gotypes.Element) bool) bool

matchAll function

func (*ArrayList) MatchAny

func (arrayList *ArrayList) MatchAny(matchAnyFn func(e *gotypes.Element) bool) bool

matchAny function

func (*ArrayList) MatchNone

func (arrayList *ArrayList) MatchNone(matchNoneFn func(e *gotypes.Element) bool) bool

matchNone function

func (*ArrayList) Reduce

func (arrayList *ArrayList) Reduce(val gotypes.Element, reduceFn func(val gotypes.Element, e *gotypes.Element) gotypes.Element) gotypes.Element

reduce function

func (*ArrayList) Remove

func (arrayList *ArrayList) Remove(index int) *gotypes.Element

remove index element

func (*ArrayList) Size

func (arrayList *ArrayList) Size() int

return list size

type LinkedElement

type LinkedElement struct {
	Prev  *gotypes.Element
	Value *gotypes.Element
	Next  *gotypes.Element
}

Define LinkedElement struct

type LinkedList

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

Define LinkedList struct

func NewLinkedList

func NewLinkedList() *LinkedList

create new empty List

func (*LinkedList) Add

func (linkedList *LinkedList) Add(e gotypes.Element) *LinkedList

add element into tail

func (*LinkedList) Clear

func (linkedList *LinkedList) Clear()

clear List

func (*LinkedList) Filter

func (linkedList *LinkedList) Filter(filterFn func(e *LinkedElement) bool) *LinkedList

filter function

func (*LinkedList) ForEach

func (linkedList *LinkedList) ForEach(fn func(e *LinkedElement))

foreach function

func (*LinkedList) Head

func (linkedList *LinkedList) Head() *LinkedElement

return first element

func (*LinkedList) Map

func (linkedList *LinkedList) Map(mapFn func(e *LinkedElement) gotypes.Element) *LinkedList

map function

func (*LinkedList) MatchAll

func (linkedList *LinkedList) MatchAll(matchAllFn func(e *LinkedElement) bool) bool

matchAll function

func (*LinkedList) MatchAny

func (linkedList *LinkedList) MatchAny(matchAnyFn func(e *LinkedElement) bool) bool

matchAny function

func (*LinkedList) MatchNone

func (linkedList *LinkedList) MatchNone(matchNoneFn func(e *LinkedElement) bool) bool

matchNone function

func (*LinkedList) Peek

func (linkedList *LinkedList) Peek() *LinkedElement

return tail and remove it

func (*LinkedList) Reduce

func (linkedList *LinkedList) Reduce(val gotypes.Element, reduceFn func(val gotypes.Element, e *LinkedElement) gotypes.Element) gotypes.Element

reduce function

func (*LinkedList) Size

func (linkedList *LinkedList) Size() int

return List size

func (*LinkedList) Tail

func (linkedList *LinkedList) Tail() *LinkedElement

return last element

func (*LinkedList) Take

func (linkedList *LinkedList) Take() *LinkedElement

return head and remove it

Jump to

Keyboard shortcuts

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