double_linked

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: GPL-3.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 List

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

func FromSlice

func FromSlice(values ...interface{}) *List

func New

func New() *List

func (*List) Append

func (l *List) Append(value interface{})

Adding, Inserting, Removing

func (*List) Find

func (l *List) Find(value interface{}) int

func (*List) Get

func (l *List) Get(index int) interface{}

Getting & Finding values

func (*List) GetUnchecked

func (l *List) GetUnchecked(index int) interface{}

func (*List) InsertAtIndex

func (l *List) InsertAtIndex(value interface{}, index int)

func (*List) InsertAtIndexUnchecked

func (l *List) InsertAtIndexUnchecked(value interface{}, index int)

Only use if you GUARANTEE that you will pass in a valid index Passing in an invalid index results in undefined behavior No guarantees are made for this function if indices are out of bounds

func (*List) Remove

func (l *List) Remove(value interface{})

func (*List) RemoveAtIndex

func (l *List) RemoveAtIndex(index int)

func (*List) RemoveAtIndexUnchecked

func (l *List) RemoveAtIndexUnchecked(index int)

Only use if you GUARANTEE that you will pass in a valid index Passing in an invalid index results in undefined behavior No guarantees are made for this function if indices are out of bounds

func (*List) Sort

func (l *List) Sort(less func(i, j interface{}) int)

func (*List) String

func (l *List) String() string

func (*List) StringBackwards

func (l *List) StringBackwards() string

For testing purposes

func (*List) ToSlice

func (l *List) ToSlice() []interface{}

type Node

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

Jump to

Keyboard shortcuts

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