list

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedList

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

func Make

func Make(vals ...interface{}) *LinkedList

func MakeBytesList

func MakeBytesList(vals ...[]byte) *LinkedList

func (*LinkedList) Add

func (list *LinkedList) Add(val interface{})

func (*LinkedList) Contains

func (list *LinkedList) Contains(val interface{}) bool

func (*LinkedList) ForEach

func (list *LinkedList) ForEach(consumer func(int, interface{}) bool)

func (*LinkedList) Get

func (list *LinkedList) Get(index int) (val interface{})

func (*LinkedList) Insert

func (list *LinkedList) Insert(index int, val interface{})

func (*LinkedList) Len

func (list *LinkedList) Len() int

func (*LinkedList) Range

func (list *LinkedList) Range(start int, stop int) []interface{}

func (*LinkedList) Remove

func (list *LinkedList) Remove(index int) (val interface{})

func (*LinkedList) RemoveAllByVal

func (list *LinkedList) RemoveAllByVal(val interface{}) int

func (*LinkedList) RemoveByVal

func (list *LinkedList) RemoveByVal(val interface{}, count int) int

*

  • remove at most `count` values of the specified value in this list
  • scan from left to right

func (*LinkedList) RemoveLast

func (list *LinkedList) RemoveLast() (val interface{})

func (*LinkedList) ReverseRemoveByVal

func (list *LinkedList) ReverseRemoveByVal(val interface{}, count int) int

func (*LinkedList) Set

func (list *LinkedList) Set(index int, val interface{})

Jump to

Keyboard shortcuts

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