datastructures

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFound = fmt.Errorf("not found")

Functions

This section is empty.

Types

type Mut

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

func NewMut

func NewMut[T any](value T) *Mut[T]

func (*Mut[T]) GetValue

func (m *Mut[T]) GetValue() T

func (*Mut[T]) SetValue

func (m *Mut[T]) SetValue(value T)

type MutList

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

func NewMutList

func NewMutList[T any]() *MutList[T]

func NewMutListFromArray

func NewMutListFromArray[T any](initial []T) *MutList[T]

func (*MutList[T]) Add

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

func (*MutList[T]) AddAll

func (l *MutList[T]) AddAll(items []T)

func (*MutList[T]) Clear

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

func (*MutList[T]) Contains

func (l *MutList[T]) Contains(item T) bool

func (*MutList[T]) Filter

func (l *MutList[T]) Filter(f func(T) bool) *MutList[T]

func (*MutList[T]) Find

func (l *MutList[T]) Find(f func(t T) bool) (T, error)

func (*MutList[T]) Get

func (l *MutList[T]) Get(index int) T

func (*MutList[T]) Head

func (l *MutList[T]) Head(n int) *MutList[T]

func (*MutList[T]) Items

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

func (*MutList[T]) Len

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

func (*MutList[T]) Remove

func (l *MutList[T]) Remove(item T)

func (*MutList[T]) RemoveAfter

func (l *MutList[T]) RemoveAfter(index int)

func (*MutList[T]) RemoveIf

func (l *MutList[T]) RemoveIf(f func(T) bool)

func (*MutList[T]) SortFunc

func (l *MutList[T]) SortFunc(f func(a, b T) int)

type SyncMutList

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

func NewSyncMutList

func NewSyncMutList[T any]() *SyncMutList[T]

func NewSyncMutListFromArray

func NewSyncMutListFromArray[T any](initial []T) *SyncMutList[T]

func (*SyncMutList[T]) Add

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

func (*SyncMutList[T]) AddAll

func (l *SyncMutList[T]) AddAll(items []T)

func (*SyncMutList[T]) Clear

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

func (*SyncMutList[T]) Contains

func (l *SyncMutList[T]) Contains(item T) bool

func (*SyncMutList[T]) Filter

func (l *SyncMutList[T]) Filter(f func(T) bool) *SyncMutList[T]

func (*SyncMutList[T]) Find

func (l *SyncMutList[T]) Find(f func(t T) bool) (T, error)

func (*SyncMutList[T]) Get

func (l *SyncMutList[T]) Get(index int) T

func (*SyncMutList[T]) Head

func (l *SyncMutList[T]) Head(n int) *SyncMutList[T]

func (*SyncMutList[T]) Items

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

func (*SyncMutList[T]) Len

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

func (*SyncMutList[T]) Remove

func (l *SyncMutList[T]) Remove(item T)

func (*SyncMutList[T]) RemoveAfter

func (l *SyncMutList[T]) RemoveAfter(index int)

func (*SyncMutList[T]) RemoveIf

func (l *SyncMutList[T]) RemoveIf(f func(T) bool)

func (*SyncMutList[T]) SortFunc

func (l *SyncMutList[T]) SortFunc(f func(a, b T) int)

Jump to

Keyboard shortcuts

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