xlist

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: MulanPSL-2.0 Imports: 3 Imported by: 0

README

xlist

  • 集合对象

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DList

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

DList

func NewDList

func NewDList(safe ...bool) *DList

NewDList 初始化双向链表 默认非并发安全

func (*DList) Append

func (d *DList) Append(data interface{}) *DList

Append 追加

func (*DList) Back

func (d *DList) Back() *DNode

Back 最后一个对象

func (*DList) Front

func (d *DList) Front() *DNode

Front 第一个对象

func (*DList) IsEmpty added in v1.0.1

func (d *DList) IsEmpty() bool

IsEmpty 是否为空

func (*DList) LPop

func (d *DList) LPop() *DNode

LPop 从头移除一个 返回为 nil 时, 链表为空

func (*DList) Len

func (d *DList) Len() int

Len 长度

func (*DList) Pop

func (d *DList) Pop() *DNode

Pop 从尾部删除一个

func (*DList) String

func (d *DList) String() string

String 使用 Print 中的方法

type DNode

type DNode struct {
	Data interface{}
	// contains filtered or unexported fields
}

DNode 双向链表节点

func NewDNode

func NewDNode(data interface{}) *DNode

NewDNode

func (*DNode) String added in v1.1.0

func (dn *DNode) String() string

String 打印

Jump to

Keyboard shortcuts

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