quic-go: github.com/lucas-clemente/quic-go/internal/utils/linkedlist Index | Files

package linkedlist

import "github.com/lucas-clemente/quic-go/internal/utils/linkedlist"

Index

Package Files

linkedlist.go

type Item Uses

type Item generic.Type

Item is a generic type.

type ItemElement Uses

type ItemElement struct {

    // The value stored with this element.
    Value Item
    // contains filtered or unexported fields
}

ItemElement is an element of a linked list.

func (*ItemElement) Next Uses

func (e *ItemElement) Next() *ItemElement

Next returns the next list element or nil.

func (*ItemElement) Prev Uses

func (e *ItemElement) Prev() *ItemElement

Prev returns the previous list element or nil.

type ItemList Uses

type ItemList struct {
    // contains filtered or unexported fields
}

ItemList is a linked list of Items.

func NewItemList Uses

func NewItemList() *ItemList

NewItemList returns an initialized list.

func (*ItemList) Back Uses

func (l *ItemList) Back() *ItemElement

Back returns the last element of list l or nil if the list is empty.

func (*ItemList) Front Uses

func (l *ItemList) Front() *ItemElement

Front returns the first element of list l or nil if the list is empty.

func (*ItemList) Init Uses

func (l *ItemList) Init() *ItemList

Init initializes or clears list l.

func (*ItemList) InsertAfter Uses

func (l *ItemList) InsertAfter(v Item, mark *ItemElement) *ItemElement

InsertAfter inserts a new element e with value v immediately after mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.

func (*ItemList) InsertBefore Uses

func (l *ItemList) InsertBefore(v Item, mark *ItemElement) *ItemElement

InsertBefore inserts a new element e with value v immediately before mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.

func (*ItemList) Len Uses

func (l *ItemList) Len() int

Len returns the number of elements of list l. The complexity is O(1).

func (*ItemList) MoveAfter Uses

func (l *ItemList) MoveAfter(e, mark *ItemElement)

MoveAfter moves element e to its new position after mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.

func (*ItemList) MoveBefore Uses

func (l *ItemList) MoveBefore(e, mark *ItemElement)

MoveBefore moves element e to its new position before mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.

func (*ItemList) MoveToBack Uses

func (l *ItemList) MoveToBack(e *ItemElement)

MoveToBack moves element e to the back of list l. If e is not an element of l, the list is not modified. The element must not be nil.

func (*ItemList) MoveToFront Uses

func (l *ItemList) MoveToFront(e *ItemElement)

MoveToFront moves element e to the front of list l. If e is not an element of l, the list is not modified. The element must not be nil.

func (*ItemList) PushBack Uses

func (l *ItemList) PushBack(v Item) *ItemElement

PushBack inserts a new element e with value v at the back of list l and returns e.

func (*ItemList) PushBackList Uses

func (l *ItemList) PushBackList(other *ItemList)

PushBackList inserts a copy of an other list at the back of list l. The lists l and other may be the same. They must not be nil.

func (*ItemList) PushFront Uses

func (l *ItemList) PushFront(v Item) *ItemElement

PushFront inserts a new element e with value v at the front of list l and returns e.

func (*ItemList) PushFrontList Uses

func (l *ItemList) PushFrontList(other *ItemList)

PushFrontList inserts a copy of an other list at the front of list l. The lists l and other may be the same. They must not be nil.

func (*ItemList) Remove Uses

func (l *ItemList) Remove(e *ItemElement) Item

Remove removes e from l if e is an element of list l. It returns the element value e.Value. The element must not be nil.

Package linkedlist imports 1 packages (graph). Updated 2018-04-06. Refresh now. Tools for package owners.