list

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeList

type SafeList struct {
	sync.RWMutex
	L *list.List
}

func NewSafeList

func NewSafeList() *SafeList

func (*SafeList) BackAll

func (this *SafeList) BackAll() []interface{}

func (*SafeList) Front

func (this *SafeList) Front() interface{}

func (*SafeList) FrontAll

func (this *SafeList) FrontAll() []interface{}

func (*SafeList) Len

func (this *SafeList) Len() int

func (*SafeList) PopBack

func (this *SafeList) PopBack() interface{}

func (*SafeList) PopBackAll

func (this *SafeList) PopBackAll() []interface{}

func (*SafeList) PopBackBy

func (this *SafeList) PopBackBy(max int) []interface{}

func (*SafeList) PushFront

func (this *SafeList) PushFront(v interface{}) *list.Element

func (*SafeList) PushFrontBatch

func (this *SafeList) PushFrontBatch(vs []interface{})

func (*SafeList) Remove

func (this *SafeList) Remove(e *list.Element) interface{}

func (*SafeList) RemoveAll

func (this *SafeList) RemoveAll()

type SafeListLimited

type SafeListLimited struct {
	SL *SafeList
	// contains filtered or unexported fields
}

SafeList with Limited Size

func NewSafeListLimited

func NewSafeListLimited(maxSize int) *SafeListLimited

func (*SafeListLimited) Front

func (this *SafeListLimited) Front() interface{}

func (*SafeListLimited) FrontAll

func (this *SafeListLimited) FrontAll() []interface{}

func (*SafeListLimited) Len

func (this *SafeListLimited) Len() int

func (*SafeListLimited) PopBack

func (this *SafeListLimited) PopBack() interface{}

func (*SafeListLimited) PopBackBy

func (this *SafeListLimited) PopBackBy(max int) []interface{}

func (*SafeListLimited) PushFront

func (this *SafeListLimited) PushFront(v interface{}) bool

func (*SafeListLimited) PushFrontBatch

func (this *SafeListLimited) PushFrontBatch(vs []interface{}) bool

func (*SafeListLimited) PushFrontViolently

func (this *SafeListLimited) PushFrontViolently(v interface{}) bool

func (*SafeListLimited) RemoveAll

func (this *SafeListLimited) RemoveAll()

Jump to

Keyboard shortcuts

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