sortedlist

package
v2.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const BucketMaxLength = 100000
View Source
const InnerBucketMaxLength = 10000

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item interface {
	GetSortKeys() (key1 int, key2 int)
}

type SortedList

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

func NewSortedList

func NewSortedList() *SortedList

func (*SortedList) Add

func (l *SortedList) Add(data Item) (err error)

func (*SortedList) Delete

func (l *SortedList) Delete(data Item) (err error)

func (*SortedList) Range

func (l *SortedList) Range(fn func(data Item) bool)

func (*SortedList) RangeLimit

func (l *SortedList) RangeLimit(limit int, fn func(Item) bool)

func (*SortedList) RangeReverse

func (l *SortedList) RangeReverse(fn func(data Item) bool)

func (*SortedList) RangeReverseLimit

func (l *SortedList) RangeReverseLimit(limit int, fn func(Item) bool)

func (*SortedList) Size

func (l *SortedList) Size() int

func (*SortedList) Update

func (l *SortedList) Update(data Item) (err error)

func (*SortedList) UpdateOrAdd

func (l *SortedList) UpdateOrAdd(data Item) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL