Documentation
¶
Index ¶
- Variables
- type Mut
- type MutList
- func (l *MutList[T]) Add(item T)
- func (l *MutList[T]) AddAll(items []T)
- func (l *MutList[T]) Clear()
- func (l *MutList[T]) Contains(item T) bool
- func (l *MutList[T]) Filter(f func(T) bool) *MutList[T]
- func (l *MutList[T]) Find(f func(t T) bool) (T, error)
- func (l *MutList[T]) Get(index int) T
- func (l *MutList[T]) Head(n int) *MutList[T]
- func (l *MutList[T]) Items() []T
- func (l *MutList[T]) Len() int
- func (l *MutList[T]) Remove(item T)
- func (l *MutList[T]) RemoveAfter(index int)
- func (l *MutList[T]) RemoveIf(f func(T) bool)
- func (l *MutList[T]) SortFunc(f func(a, b T) int)
- type SyncMutList
- func (l *SyncMutList[T]) Add(item T)
- func (l *SyncMutList[T]) AddAll(items []T)
- func (l *SyncMutList[T]) Clear()
- func (l *SyncMutList[T]) Contains(item T) bool
- func (l *SyncMutList[T]) Filter(f func(T) bool) *SyncMutList[T]
- func (l *SyncMutList[T]) Find(f func(t T) bool) (T, error)
- func (l *SyncMutList[T]) Get(index int) T
- func (l *SyncMutList[T]) Head(n int) *SyncMutList[T]
- func (l *SyncMutList[T]) Items() []T
- func (l *SyncMutList[T]) Len() int
- func (l *SyncMutList[T]) Remove(item T)
- func (l *SyncMutList[T]) RemoveAfter(index int)
- func (l *SyncMutList[T]) RemoveIf(f func(T) bool)
- func (l *SyncMutList[T]) SortFunc(f func(a, b T) int)
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFound = fmt.Errorf("not found")
Functions ¶
This section is empty.
Types ¶
type MutList ¶
type MutList[T any] struct { // contains filtered or unexported fields }
func NewMutList ¶
func NewMutListFromArray ¶
func (*MutList[T]) RemoveAfter ¶
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)
Click to show internal directories.
Click to hide internal directories.