sortedmap

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item interface {
	// Less tests whether the current item is less than the given argument.
	//
	// This must provide a strict weak ordering.
	// If !a.Less(b) && !b.Less(a), we treat this to mean a == b (i.e. we can only
	// hold one of either a or b in the tree).
	Less(than Item) bool

	// Key returns the key of the item.
	Key() string
}

type ItemIterator

type ItemIterator func(i Item) bool

type SortedMap

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

func New

func New() *SortedMap

func (*SortedMap) Ascend

func (m *SortedMap) Ascend(fn ItemIterator)

func (*SortedMap) Clear

func (m *SortedMap) Clear()

func (*SortedMap) Delete

func (m *SortedMap) Delete(key string)

func (*SortedMap) Insert

func (m *SortedMap) Insert(task Item)

func (*SortedMap) Len

func (m *SortedMap) Len() int

func (*SortedMap) Min

func (m *SortedMap) Min() Item

Jump to

Keyboard shortcuts

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