Documentation
¶
Overview ¶
Package branch implements a custom doubly linked list from https://golang.org/src/container/list/list.go for creating a limited tree structure for scpwm-euclid containing monitor/desktop/client iterations
Index ¶
- type Branch
- func (b *Branch) Back() *Element
- func (b *Branch) Front() *Element
- func (b *Branch) Init(id string) *Branch
- func (b *Branch) InsertAfter(v interface{}, mark *Element) *Element
- func (b *Branch) InsertBefore(v interface{}, mark *Element) *Element
- func (b *Branch) Len() int
- func (b *Branch) MoveAfter(e, mark *Element)
- func (b *Branch) MoveBefore(e, mark *Element)
- func (b *Branch) MoveToBack(e *Element)
- func (b *Branch) MoveToFront(e *Element)
- func (b *Branch) PushBack(v interface{}) *Element
- func (b *Branch) PushBackBranch(other *Branch)
- func (b *Branch) PushFront(v interface{}) *Element
- func (b *Branch) PushFrontBranch(other *Branch)
- func (b *Branch) Remove(e *Element) interface{}
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct {
// contains filtered or unexported fields
}
func (*Branch) InsertAfter ¶
InsertAfter inserts a new element e with value v immediately after mark and returns e. If mark is not an element of b, the branch is not modified.
func (*Branch) InsertBefore ¶
InsertBefore inserts a new element e with value v immediately before mark and returns e. If mark is not an element of b, the branch is not modified.
func (*Branch) MoveAfter ¶
MoveAfter moves element e to its new position after mark. If e or mark is not an element of b, or e == mark, the branch is not modified.
func (*Branch) MoveBefore ¶
MoveBefore moves element e to its new position before mark. If e or mark is not an element of b, or e == mark, the branch is not modified.
func (*Branch) MoveToBack ¶
MoveToBack moves element e to the back of branch b. If e is not an element of b, the branch is not modified.
func (*Branch) MoveToFront ¶
MoveToFront moves element e to the front of branch l. If e is not an element of l, the branch is not modified.
func (*Branch) PushBack ¶
PushBack inserts a new element e with value v at the back of branch b and returns e.
func (*Branch) PushBackBranch ¶
PushBackBranch inserts a copy of an other branch at the back of branch b. The branchs b and other may be the same.
func (*Branch) PushFront ¶
PushFront inserts a new element e with value v at the front of branch b and returns e.
func (*Branch) PushFrontBranch ¶
PushFrontBranch inserts a copy of an other branch at the front of branch b. The branchs b and other may be the same.
type Element ¶
type Element struct { Value interface{} // contains filtered or unexported fields }
func (*Element) NextContinuous ¶
NextContinuous returns the next *Element continuously, looping to the front when the root is reached.
func (*Element) PrevContinuous ¶
PrevContinuous returns the previous *Element continuously, looping to the back when the root is reached.