data-structures: github.com/timtadh/data-structures/list Index | Files

package list

import "github.com/timtadh/data-structures/list"

Index

Package Files

array_list.go sorted.go

func Equals Uses

func Equals(a, b types.IterableContainer) bool

func Hash Uses

func Hash(a types.ListIterable) int

func Less Uses

func Less(a, b types.IterableContainer) bool

func NewSortable Uses

func NewSortable(list *List) sort.Interface

type List Uses

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

func Fixed Uses

func Fixed(size int) *List

Creates a Fixed Size list.

func FromSlice Uses

func FromSlice(list []types.Hashable) *List

func New Uses

func New(initialSize int) *List

Creates a list.

func (*List) Append Uses

func (l *List) Append(item types.Hashable) error

func (*List) Clear Uses

func (l *List) Clear()

func (*List) Copy Uses

func (l *List) Copy() *List

func (*List) Empty Uses

func (l *List) Empty() bool

func (*List) Equals Uses

func (l *List) Equals(b types.Equatable) bool

func (*List) Extend Uses

func (l *List) Extend(it types.KIterator) (err error)

func (*List) Full Uses

func (l *List) Full() bool

func (*List) Get Uses

func (l *List) Get(i int) (item types.Hashable, err error)

func (*List) Has Uses

func (l *List) Has(item types.Hashable) (has bool)

func (*List) Hash Uses

func (l *List) Hash() int

func (*List) Insert Uses

func (l *List) Insert(i int, item types.Hashable) error

func (*List) Items Uses

func (l *List) Items() (it types.KIterator)

func (*List) ItemsInReverse Uses

func (l *List) ItemsInReverse() (it types.KIterator)

func (*List) Less Uses

func (l *List) Less(b types.Sortable) bool

func (*List) Pop Uses

func (l *List) Pop() (item types.Hashable, err error)

func (*List) Push Uses

func (l *List) Push(item types.Hashable) error

func (*List) Remove Uses

func (l *List) Remove(i int) error

func (*List) Set Uses

func (l *List) Set(i int, item types.Hashable) (err error)

func (*List) Size Uses

func (l *List) Size() int

func (*List) String Uses

func (l *List) String() string

type MList Uses

type MList struct {
    List
    MarshalItem   types.ItemMarshal
    UnmarshalItem types.ItemUnmarshal
}

func NewMList Uses

func NewMList(list *List, marshal types.ItemMarshal, unmarshal types.ItemUnmarshal) *MList

func (*MList) MarshalBinary Uses

func (m *MList) MarshalBinary() ([]byte, error)

func (*MList) UnmarshalBinary Uses

func (m *MList) UnmarshalBinary(bytes []byte) error

type MSorted Uses

type MSorted struct {
    MList
    AllowDups bool
}

func NewMSorted Uses

func NewMSorted(s *Sorted, marshal types.ItemMarshal, unmarshal types.ItemUnmarshal) *MSorted

func (*MSorted) MarshalBinary Uses

func (m *MSorted) MarshalBinary() ([]byte, error)

func (*MSorted) Sorted Uses

func (m *MSorted) Sorted() *Sorted

func (*MSorted) UnmarshalBinary Uses

func (m *MSorted) UnmarshalBinary(bytes []byte) error

type Sortable Uses

type Sortable struct {
    List
}

func (*Sortable) Len Uses

func (s *Sortable) Len() int

func (*Sortable) Less Uses

func (s *Sortable) Less(i, j int) bool

func (*Sortable) Swap Uses

func (s *Sortable) Swap(i, j int)

type Sorted Uses

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

func NewFixedSorted Uses

func NewFixedSorted(size int, allowDups bool) *Sorted

Creates a fixed size sorted list.

func NewSorted Uses

func NewSorted(initialSize int, allowDups bool) *Sorted

Creates a sorted list.

func SortedFromSlice Uses

func SortedFromSlice(items []types.Hashable, allowDups bool) *Sorted

func (*Sorted) Add Uses

func (s *Sorted) Add(item types.Hashable) (err error)

func (*Sorted) Clear Uses

func (s *Sorted) Clear()

func (*Sorted) Copy Uses

func (s *Sorted) Copy() *Sorted

func (*Sorted) Delete Uses

func (s *Sorted) Delete(item types.Hashable) (err error)

func (*Sorted) Empty Uses

func (s *Sorted) Empty() bool

func (*Sorted) Equals Uses

func (s *Sorted) Equals(b types.Equatable) bool

func (*Sorted) Extend Uses

func (s *Sorted) Extend(other types.KIterator) (err error)

func (*Sorted) Find Uses

func (s *Sorted) Find(item types.Hashable) (int, bool, error)

func (*Sorted) Full Uses

func (s *Sorted) Full() bool

func (*Sorted) Get Uses

func (s *Sorted) Get(i int) (item types.Hashable, err error)

func (*Sorted) Has Uses

func (s *Sorted) Has(item types.Hashable) (has bool)

func (*Sorted) Hash Uses

func (s *Sorted) Hash() int

func (*Sorted) Item Uses

func (s *Sorted) Item(item types.Hashable) (types.Hashable, error)

func (*Sorted) Items Uses

func (s *Sorted) Items() (it types.KIterator)

func (*Sorted) ItemsInReverse Uses

func (s *Sorted) ItemsInReverse() (it types.KIterator)

func (*Sorted) Less Uses

func (s *Sorted) Less(b types.Sortable) bool

func (*Sorted) Size Uses

func (s *Sorted) Size() int

func (*Sorted) String Uses

func (s *Sorted) String() string

Package list imports 9 packages (graph) and is imported by 3 packages. Updated 2016-11-23. Refresh now. Tools for package owners.