Documentation ¶
Overview ¶
Package dll provides a lock-free implementation of doubly linked list.
Index ¶
- type Element
- type List
- func (l *List) Empty() bool
- func (l *List) Init() *List
- func (l *List) Next(node *Element) *Element
- func (l *List) PopLeft() interface{}
- func (l *List) PopRight() interface{}
- func (l *List) Prev(node *Element) *Element
- func (l *List) PushLeft(v interface{}) *Element
- func (l *List) PushRight(v interface{}) *Element
- func (l *List) Remove(e *Element) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { // The value stored with this element. Value interface{} // contains filtered or unexported fields }
Element is an element of a linked list.
type List ¶
type List struct {
// contains filtered or unexported fields
}
List represents a doubly linked list.
func (*List) PopLeft ¶
func (l *List) PopLeft() interface{}
PopLeft returns the first element of list l or nil if the list is empty.
func (*List) PopRight ¶
func (l *List) PopRight() interface{}
PopRight returns the last element of list l or nil if the list is empty.
func (*List) PushLeft ¶
PushLeft inserts a new element e with value v at the front of list l and returns e.
Click to show internal directories.
Click to hide internal directories.