Documentation ¶
Overview ¶
Package glist provides a concurrent-safe(alternative) doubly linked list.
并发安全双向链表.
Index ¶
- type Element
- type List
- func (l *List) Back() (e *Element)
- func (l *List) BackAll() (values []interface{})
- func (l *List) BackItem() (value interface{})
- func (l *List) BatchPopBack(max int) (values []interface{})
- func (l *List) BatchPopFront(max int) (values []interface{})
- func (l *List) BatchPushBack(values []interface{})
- func (l *List) BatchPushFront(values []interface{})
- func (l *List) BatchRemove(es []*Element)
- func (l *List) Front() (e *Element)
- func (l *List) FrontAll() (values []interface{})
- func (l *List) FrontItem() (value interface{})
- func (l *List) InsertAfter(v interface{}, p *Element) (e *Element)
- func (l *List) InsertBefore(v interface{}, p *Element) (e *Element)
- func (l *List) Len() (length int)
- func (l *List) LockFunc(f func(list *list.List))
- func (l *List) MoveAfter(e, p *Element)
- func (l *List) MoveBefore(e, p *Element)
- func (l *List) MoveToBack(e *Element)
- func (l *List) MoveToFront(e *Element)
- func (l *List) PopBack() (value interface{})
- func (l *List) PopBackAll() []interface{}
- func (l *List) PopFront() (value interface{})
- func (l *List) PopFrontAll() []interface{}
- func (l *List) PushBack(v interface{}) (e *Element)
- func (l *List) PushBackList(other *List)
- func (l *List) PushFront(v interface{}) (e *Element)
- func (l *List) PushFrontList(other *List)
- func (l *List) RLockFunc(f func(list *list.List))
- func (l *List) Remove(e *Element) (value interface{})
- func (l *List) RemoveAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
变长双向链表
func (*List) BatchPopBack ¶ added in v1.5.0
批量从链表尾端出栈数据项(删除)
func (*List) BatchPopFront ¶ added in v1.5.0
批量从链表头端出栈数据项(删除)
func (*List) BatchPushBack ¶ added in v1.5.0
func (l *List) BatchPushBack(values []interface{})
批量往链表尾入栈数据项
func (*List) BatchPushFront ¶ added in v1.5.0
func (l *List) BatchPushFront(values []interface{})
批量往链表头入栈数据项
func (*List) InsertAfter ¶
在list中元素项p之后插入一个值为v的元素,并返回该元素,如果mark不是list中元素,则list不改变。
func (*List) InsertBefore ¶
在list中元素项p之前插入一个值为v的元素,并返回该元素,如果mark不是list中元素,则list不改变。
func (*List) MoveBefore ¶
func (*List) MoveToBack ¶
func (*List) MoveToFront ¶
func (*List) PushBackList ¶
func (*List) PushFrontList ¶
Click to show internal directories.
Click to hide internal directories.