list

package
Version: v0.0.0-...-1974178 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0, BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchElement   = errors.New("element does not exist")
	ErrInvalidArgument = errors.New("invalid argument")
)

Functions

This section is empty.

Types

type DoublyLinkedList

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

func NewDoublyLinkedList

func NewDoublyLinkedList() *DoublyLinkedList

func (*DoublyLinkedList) Add

func (list *DoublyLinkedList) Add(value interface{}) *DoublyLinkedListEntry

Appends the specified value to the end of this list.

func (*DoublyLinkedList) AddEntry

func (list *DoublyLinkedList) AddEntry(entry *DoublyLinkedListEntry)

Appends the specified element to the end of this list.

func (*DoublyLinkedList) AddFirst

func (list *DoublyLinkedList) AddFirst(value interface{}) *DoublyLinkedListEntry

func (*DoublyLinkedList) AddFirstEntry

func (list *DoublyLinkedList) AddFirstEntry(entry *DoublyLinkedListEntry)

func (*DoublyLinkedList) AddLast

func (list *DoublyLinkedList) AddLast(value interface{}) *DoublyLinkedListEntry

func (*DoublyLinkedList) AddLastEntry

func (list *DoublyLinkedList) AddLastEntry(entry *DoublyLinkedListEntry)

func (*DoublyLinkedList) Clear

func (list *DoublyLinkedList) Clear()

func (*DoublyLinkedList) GetFirst

func (list *DoublyLinkedList) GetFirst() (interface{}, error)

func (*DoublyLinkedList) GetFirstEntry

func (list *DoublyLinkedList) GetFirstEntry() (*DoublyLinkedListEntry, error)

func (*DoublyLinkedList) GetLast

func (list *DoublyLinkedList) GetLast() (interface{}, error)

func (*DoublyLinkedList) GetLastEntry

func (list *DoublyLinkedList) GetLastEntry() (*DoublyLinkedListEntry, error)

func (*DoublyLinkedList) GetSize

func (list *DoublyLinkedList) GetSize() int

func (*DoublyLinkedList) RemoveEntry

func (list *DoublyLinkedList) RemoveEntry(entry *DoublyLinkedListEntry) error

func (*DoublyLinkedList) RemoveFirst

func (list *DoublyLinkedList) RemoveFirst() (interface{}, error)

func (*DoublyLinkedList) RemoveFirstEntry

func (list *DoublyLinkedList) RemoveFirstEntry() (*DoublyLinkedListEntry, error)

func (*DoublyLinkedList) RemoveLast

func (list *DoublyLinkedList) RemoveLast() (interface{}, error)

func (*DoublyLinkedList) RemoveLastEntry

func (list *DoublyLinkedList) RemoveLastEntry() (*DoublyLinkedListEntry, error)

type DoublyLinkedListEntry

type DoublyLinkedListEntry struct {
	Value interface{}
	Prev  *DoublyLinkedListEntry
	Next  *DoublyLinkedListEntry
	// contains filtered or unexported fields
}

func (*DoublyLinkedListEntry) GetNext

func (entry *DoublyLinkedListEntry) GetNext() *DoublyLinkedListEntry

func (*DoublyLinkedListEntry) GetPrev

func (entry *DoublyLinkedListEntry) GetPrev() *DoublyLinkedListEntry

func (*DoublyLinkedListEntry) GetValue

func (entry *DoublyLinkedListEntry) GetValue() interface{}

func (*DoublyLinkedListEntry) SetNext

func (entry *DoublyLinkedListEntry) SetNext(next *DoublyLinkedListEntry)

func (*DoublyLinkedListEntry) SetPrev

func (entry *DoublyLinkedListEntry) SetPrev(prev *DoublyLinkedListEntry)

func (*DoublyLinkedListEntry) SetValue

func (entry *DoublyLinkedListEntry) SetValue(value interface{})

type SyncDoublyLinkedList

type SyncDoublyLinkedList struct {
	Unsafe DoublyLinkedList
	// contains filtered or unexported fields
}

SyncDoublyLinkedList is a DoublyLinkedList but with synchronized methods.

func NewSyncDoublyLinkedList

func NewSyncDoublyLinkedList() *SyncDoublyLinkedList

func (*SyncDoublyLinkedList) Add

func (list *SyncDoublyLinkedList) Add(value interface{}) *DoublyLinkedListEntry

Appends the specified value to the end of this list.

func (*SyncDoublyLinkedList) AddEntry

func (list *SyncDoublyLinkedList) AddEntry(entry *DoublyLinkedListEntry)

Appends the specified element to the end of this list.

func (*SyncDoublyLinkedList) AddFirst

func (list *SyncDoublyLinkedList) AddFirst(value interface{}) *DoublyLinkedListEntry

func (*SyncDoublyLinkedList) AddFirstEntry

func (list *SyncDoublyLinkedList) AddFirstEntry(entry *DoublyLinkedListEntry)

func (*SyncDoublyLinkedList) AddLast

func (list *SyncDoublyLinkedList) AddLast(value interface{}) *DoublyLinkedListEntry

func (*SyncDoublyLinkedList) AddLastEntry

func (list *SyncDoublyLinkedList) AddLastEntry(entry *DoublyLinkedListEntry)

func (*SyncDoublyLinkedList) Clear

func (list *SyncDoublyLinkedList) Clear()

func (*SyncDoublyLinkedList) GetFirst

func (list *SyncDoublyLinkedList) GetFirst() (interface{}, error)

func (*SyncDoublyLinkedList) GetFirstEntry

func (list *SyncDoublyLinkedList) GetFirstEntry() (*DoublyLinkedListEntry, error)

func (*SyncDoublyLinkedList) GetLast

func (list *SyncDoublyLinkedList) GetLast() (interface{}, error)

func (*SyncDoublyLinkedList) GetLastEntry

func (list *SyncDoublyLinkedList) GetLastEntry() (*DoublyLinkedListEntry, error)

func (*SyncDoublyLinkedList) GetSize

func (list *SyncDoublyLinkedList) GetSize() int

func (*SyncDoublyLinkedList) Remove

func (list *SyncDoublyLinkedList) Remove(value interface{}) error

func (*SyncDoublyLinkedList) RemoveEntry

func (list *SyncDoublyLinkedList) RemoveEntry(entry *DoublyLinkedListEntry) error

func (*SyncDoublyLinkedList) RemoveFirst

func (list *SyncDoublyLinkedList) RemoveFirst() (interface{}, error)

func (*SyncDoublyLinkedList) RemoveFirstEntry

func (list *SyncDoublyLinkedList) RemoveFirstEntry() (*DoublyLinkedListEntry, error)

func (*SyncDoublyLinkedList) RemoveLast

func (list *SyncDoublyLinkedList) RemoveLast() (interface{}, error)

func (*SyncDoublyLinkedList) RemoveLastEntry

func (list *SyncDoublyLinkedList) RemoveLastEntry() (*DoublyLinkedListEntry, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL