list

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 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 ArrayList

type ArrayList[T comparable] []T

func (*ArrayList[T]) Add

func (al *ArrayList[T]) Add(e ...T)

Add 添加数据

func (*ArrayList[T]) Delete

func (al *ArrayList[T]) Delete(index int)

Delete 删除指定索引的数据

func (*ArrayList[T]) Get

func (al *ArrayList[T]) Get(i int) T

Get 获取元素

func (*ArrayList[T]) Length

func (al *ArrayList[T]) Length() int

Length 获取数据长度

type LinkList[T comparable] struct {
	// contains filtered or unexported fields
}

func (*LinkList[T]) Add

func (receiver *LinkList[T]) Add(v T)

Add 顺序添加数据 T

func (*LinkList[T]) Delete

func (receiver *LinkList[T]) Delete()

Delete 顺序删除数据 T

func (*LinkList[T]) Get

func (receiver *LinkList[T]) Get(index int) T

type List

type List[T comparable] interface {
	Add(...T)
	Get(int) *T
	Delete(int)
	Length() int
}

Jump to

Keyboard shortcuts

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