list

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package list : a list

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

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

Iterator : iterator of list

func (Iterator) Back

func (i Iterator) Back() Iterator

Back : return next node

func (Iterator) Destroy

func (i Iterator) Destroy()

Destroy iterator

func (Iterator) Equal

func (i Iterator) Equal(it Iterator) bool

Equal : is same iterator

func (Iterator) Front

func (i Iterator) Front() Iterator

Front : return pre node

func (Iterator) InsertBack

func (i Iterator) InsertBack(value interface{}) (Iterator, bool)

InsertBack : insert a node back of current

func (Iterator) InsertFront

func (i Iterator) InsertFront(value interface{}) (Iterator, bool)

InsertFront : insert a node front of current

func (Iterator) IsEnd

func (i Iterator) IsEnd() bool

IsEnd : iterator target is nil

func (*Iterator) MoveBack

func (i *Iterator) MoveBack()

MoveBack : move iterator to next node

func (*Iterator) MoveFront

func (i *Iterator) MoveFront()

MoveFront : move iterator to pre node

func (Iterator) Remove

func (i Iterator) Remove() (interface{}, bool)

Remove node from list

func (Iterator) Set

func (i Iterator) Set(value interface{}) bool

Set : set the node value

func (Iterator) Valid

func (i Iterator) Valid() bool

Valid : check iterator valid

func (Iterator) Value

func (i Iterator) Value() (interface{}, bool)

Value : node value

type List

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

List : a normal list

func (*List) Back

func (l *List) Back() Iterator

Back : next node

func (*List) Front

func (l *List) Front() Iterator

Front : pre node

func (*List) Init

func (l *List) Init() *List

Init list

func (*List) PopBack

func (l *List) PopBack() (interface{}, bool)

PopBack : pop nod from back

func (*List) PopFront

func (l *List) PopFront() (interface{}, bool)

PopFront : pop node from front

func (*List) PushBack

func (l *List) PushBack(value interface{}) Iterator

PushBack : push node in list back

func (*List) PushFront

func (l *List) PushFront(value interface{}) Iterator

PushFront : push node in list front

func (*List) Size

func (l *List) Size() int

Size : node counts

Jump to

Keyboard shortcuts

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