arraylist

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayList

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

func New

func New[T comparable]() *ArrayList[T]

func (*ArrayList[T]) Add

func (l *ArrayList[T]) Add(t ...T) error

func (*ArrayList[T]) Clear

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

func (*ArrayList[T]) Equals

func (l *ArrayList[T]) Equals(o *ArrayList[T]) bool

func (*ArrayList[T]) Get

func (l *ArrayList[T]) Get(i int) (T, error)

func (*ArrayList[T]) IsEmpty

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

func (*ArrayList[T]) Iter added in v1.0.8

func (l *ArrayList[T]) Iter(yield func(int, T) bool)

func (*ArrayList[T]) Remove

func (l *ArrayList[T]) Remove(index int) (T, error)

func (*ArrayList[T]) RemoveValue

func (l *ArrayList[T]) RemoveValue(t T) int

func (*ArrayList[T]) Size

func (l *ArrayList[T]) Size() int

func (*ArrayList[T]) Stream

func (l *ArrayList[T]) Stream() *stream.Stream[T]

func (*ArrayList[T]) ToArray

func (l *ArrayList[T]) ToArray() []T

type Builder

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

func NewBuilder

func NewBuilder[T comparable]() *Builder[T]

func (*Builder[T]) Build

func (b *Builder[T]) Build() (*ArrayList[T], error)

func (*Builder[T]) WithElements

func (b *Builder[T]) WithElements(elements []T) *Builder[T]

func (*Builder[T]) WithInitialCapacity added in v1.0.15

func (b *Builder[T]) WithInitialCapacity(capacity int) *Builder[T]

func (*Builder[T]) WithLimit

func (b *Builder[T]) WithLimit(limit int) *Builder[T]

Jump to

Keyboard shortcuts

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