slicelist

package
v0.0.0-...-49448ba Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt[T any] func(*options[T])

func WithInitialCapacity

func WithInitialCapacity[T any](capacity int) Opt[T]

type SliceList

type SliceList[T any] struct {
	// contains filtered or unexported fields
}

func FromSlice

func FromSlice[T comparable](slice []T, opts ...Opt[T]) *SliceList[T]

func New

func New[T any](opts ...Opt[T]) *SliceList[T]

func (*SliceList[T]) Add

func (l *SliceList[T]) Add(v T)

func (*SliceList[T]) AddRange

func (l *SliceList[T]) AddRange(v []T)

func (*SliceList[T]) ElementAt

func (l *SliceList[T]) ElementAt(idx int) T

func (*SliceList[T]) InsertAt

func (l *SliceList[T]) InsertAt(idx int, v T)

func (*SliceList[T]) Iter

func (l *SliceList[T]) Iter() iter.Iter[T]

func (*SliceList[T]) Len

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

func (*SliceList[T]) RemoveAt

func (l *SliceList[T]) RemoveAt(idx int)

func (*SliceList[T]) Reverse

func (l *SliceList[T]) Reverse()

Jump to

Keyboard shortcuts

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