linker

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.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 DoubID

type DoubID *doubnode

we don't want generate a int64 to index the concrete node pointer is the best index

type Doublinker

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

func NewDoublinker

func NewDoublinker() *Doublinker

func (*Doublinker) Add

func (d *Doublinker) Add(data interface{}) DoubID

append a node at tail

func (*Doublinker) Delete

func (d *Doublinker) Delete(id DoubID) error

func (*Doublinker) Foreach

func (d *Doublinker) Foreach(f ForeachFunc) error

func (*Doublinker) ForeachNode

func (d *Doublinker) ForeachNode(f ForeachDoubNodeFunc) error

func (*Doublinker) Length

func (d *Doublinker) Length() int64

func (*Doublinker) Move

func (d *Doublinker) Move(id DoubID, dst *Doublinker) error

move to another doublinker

func (*Doublinker) Retrieve

func (d *Doublinker) Retrieve(id DoubID) interface{}

func (*Doublinker) RetrieveFree

func (d *Doublinker) RetrieveFree(id DoubID) interface{}

func (*Doublinker) Take

func (d *Doublinker) Take(node *doubnode) error

func (*Doublinker) UniqueAdd

func (d *Doublinker) UniqueAdd(data interface{}) (error, DoubID)

func (*Doublinker) UniqueDelete

func (d *Doublinker) UniqueDelete(data interface{}) error

func (*Doublinker) UniqueMove

func (d *Doublinker) UniqueMove(data interface{}, dst *Doublinker) error

move to another doublinker

func (*Doublinker) UniqueRetrieve

func (d *Doublinker) UniqueRetrieve(data interface{}) (error, interface{})

func (*Doublinker) Update

func (d *Doublinker) Update(id DoubID, data interface{}) error

type ForeachDoubNodeFunc

type ForeachDoubNodeFunc func(id DoubID) error

type ForeachFunc

type ForeachFunc func(data interface{}) error

type HasEqual

type HasEqual interface {
	Equal(src interface{}) bool
}

Jump to

Keyboard shortcuts

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