Documentation ¶
Index ¶
- Variables
- type DoublyLinkedList
- func (list *DoublyLinkedList) Add(value interface{}) *DoublyLinkedListEntry
- func (list *DoublyLinkedList) AddEntry(entry *DoublyLinkedListEntry)
- func (list *DoublyLinkedList) AddFirst(value interface{}) *DoublyLinkedListEntry
- func (list *DoublyLinkedList) AddFirstEntry(entry *DoublyLinkedListEntry)
- func (list *DoublyLinkedList) AddLast(value interface{}) *DoublyLinkedListEntry
- func (list *DoublyLinkedList) AddLastEntry(entry *DoublyLinkedListEntry)
- func (list *DoublyLinkedList) Clear()
- func (list *DoublyLinkedList) GetFirst() (interface{}, error)
- func (list *DoublyLinkedList) GetFirstEntry() (*DoublyLinkedListEntry, error)
- func (list *DoublyLinkedList) GetLast() (interface{}, error)
- func (list *DoublyLinkedList) GetLastEntry() (*DoublyLinkedListEntry, error)
- func (list *DoublyLinkedList) GetSize() int
- func (list *DoublyLinkedList) RemoveEntry(entry *DoublyLinkedListEntry) error
- func (list *DoublyLinkedList) RemoveFirst() (interface{}, error)
- func (list *DoublyLinkedList) RemoveFirstEntry() (*DoublyLinkedListEntry, error)
- func (list *DoublyLinkedList) RemoveLast() (interface{}, error)
- func (list *DoublyLinkedList) RemoveLastEntry() (*DoublyLinkedListEntry, error)
- type DoublyLinkedListEntry
- func (entry *DoublyLinkedListEntry) GetNext() *DoublyLinkedListEntry
- func (entry *DoublyLinkedListEntry) GetPrev() *DoublyLinkedListEntry
- func (entry *DoublyLinkedListEntry) GetValue() interface{}
- func (entry *DoublyLinkedListEntry) SetNext(next *DoublyLinkedListEntry)
- func (entry *DoublyLinkedListEntry) SetPrev(prev *DoublyLinkedListEntry)
- func (entry *DoublyLinkedListEntry) SetValue(value interface{})
- type SyncDoublyLinkedList
- func (list *SyncDoublyLinkedList) Add(value interface{}) *DoublyLinkedListEntry
- func (list *SyncDoublyLinkedList) AddEntry(entry *DoublyLinkedListEntry)
- func (list *SyncDoublyLinkedList) AddFirst(value interface{}) *DoublyLinkedListEntry
- func (list *SyncDoublyLinkedList) AddFirstEntry(entry *DoublyLinkedListEntry)
- func (list *SyncDoublyLinkedList) AddLast(value interface{}) *DoublyLinkedListEntry
- func (list *SyncDoublyLinkedList) AddLastEntry(entry *DoublyLinkedListEntry)
- func (list *SyncDoublyLinkedList) Clear()
- func (list *SyncDoublyLinkedList) GetFirst() (interface{}, error)
- func (list *SyncDoublyLinkedList) GetFirstEntry() (*DoublyLinkedListEntry, error)
- func (list *SyncDoublyLinkedList) GetLast() (interface{}, error)
- func (list *SyncDoublyLinkedList) GetLastEntry() (*DoublyLinkedListEntry, error)
- func (list *SyncDoublyLinkedList) GetSize() int
- func (list *SyncDoublyLinkedList) Remove(value interface{}) error
- func (list *SyncDoublyLinkedList) RemoveEntry(entry *DoublyLinkedListEntry) error
- func (list *SyncDoublyLinkedList) RemoveFirst() (interface{}, error)
- func (list *SyncDoublyLinkedList) RemoveFirstEntry() (*DoublyLinkedListEntry, error)
- func (list *SyncDoublyLinkedList) RemoveLast() (interface{}, error)
- func (list *SyncDoublyLinkedList) RemoveLastEntry() (*DoublyLinkedListEntry, error)
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)
Click to show internal directories.
Click to hide internal directories.