list

package
v0.0.0-...-8f1c0a4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT 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[T any] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewEmptyList

func NewEmptyList[T any](capacity ...int) *List[T]

func NewList

func NewList[T any](data ...T) *List[T]

func (*List[T]) Add

func (l *List[T]) Add(item T)

func (*List[T]) Clear

func (l *List[T]) Clear()

func (*List[T]) Del

func (l *List[T]) Del(i int, j int)

func (*List[T]) Get

func (l *List[T]) Get(i int) T

func (*List[T]) Insert

func (l *List[T]) Insert(i int, item T)

func (*List[T]) IsEmpty

func (l *List[T]) IsEmpty() bool

func (*List[T]) Items

func (l *List[T]) Items() []T

func (*List[T]) Len

func (l *List[T]) Len() int

func (*List[T]) Loop

func (l *List[T]) Loop(fn func(i int, item T) bool)

func (*List[T]) Shift

func (l *List[T]) Shift() T

func (*List[T]) Unshift

func (l *List[T]) Unshift(item T)

Jump to

Keyboard shortcuts

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