Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/clarketm/searchablelist

Extend doubly linked list `list.go` with search methods
https://github.com/clarketm/searchablelist

doubly-linked-list golang list search

Last synced: 2 months ago
JSON representation

Extend doubly linked list `list.go` with search methods

Awesome Lists containing this project

README

        

# [SearchableList](https://godoc.org/github.com/clarketm/SearchableList)

Package `searchablelist` implements the `list` package doubly linked list
and extends it with search methods

type SearchableList
New () *SearchableList
ContainsElement (t *Element) bool
Contains (t *Element) bool
ContainsValue (v interface{}) bool
FindFirst (v interface{}) *Element
FindLast (v interface{}) *Element
FindAll (v interface{}) []*Element

type Element
func (e *Element) Next() *Element
func (e *Element) Prev() *Element

type List
func (l *List) Back() *Element
func (l *List) Front() *Element
func (l *List) Init() *List
func (l *List) InsertAfter(v interface{}, mark *Element) *Element
func (l *List) InsertBefore(v interface{}, mark *Element) *Element
func (l *List) Len() int
func (l *List) MoveAfter(e, mark *Element)
func (l *List) MoveBefore(e, mark *Element)
func (l *List) MoveToBack(e *Element)
func (l *List) MoveToFront(e *Element)
func (l *List) PushBack(v interface{}) *Element
func (l *List) PushBackList(other *List)
func (l *List) PushFront(v interface{}) *Element
func (l *List) PushFrontList(other *List)
func (l *List) Remove(e *Element) interface{}