orderedhashmap

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

package orderedhashmap contains a simple and very inefficient ordered map using the map builtin for comparing against other ordered containers in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Cursor[K, V]) Backward

func (c *Cursor[K, V]) Backward() iterator.Iterator[KVPair[K, V]]

func (*Cursor[K, V]) Forward

func (c *Cursor[K, V]) Forward() iterator.Iterator[KVPair[K, V]]

func (*Cursor[K, V]) Key

func (c *Cursor[K, V]) Key() K

func (*Cursor[K, V]) Next

func (c *Cursor[K, V]) Next()

func (*Cursor[K, V]) Ok

func (c *Cursor[K, V]) Ok() bool

func (*Cursor[K, V]) Prev

func (c *Cursor[K, V]) Prev()

func (*Cursor[K, V]) SeekFirst

func (c *Cursor[K, V]) SeekFirst()

func (*Cursor[K, V]) SeekFirstGreater

func (c *Cursor[K, V]) SeekFirstGreater(k K)

func (*Cursor[K, V]) SeekFirstGreaterOrEqual

func (c *Cursor[K, V]) SeekFirstGreaterOrEqual(k K)

func (*Cursor[K, V]) SeekLast

func (c *Cursor[K, V]) SeekLast()

func (*Cursor[K, V]) SeekLastLess

func (c *Cursor[K, V]) SeekLastLess(k K)

func (*Cursor[K, V]) SeekLastLessOrEqual

func (c *Cursor[K, V]) SeekLastLessOrEqual(k K)

func (*Cursor[K, V]) Value

func (c *Cursor[K, V]) Value() V

type KVPair

type KVPair[K any, V any] struct {
	K K
	V V
}

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V any](less xsort.Less[K]) Map[K, V]

func (Map[K, V]) Contains

func (m Map[K, V]) Contains(k K) bool

func (Map[K, V]) Cursor

func (m Map[K, V]) Cursor() *Cursor[K, V]

func (Map[K, V]) Delete

func (m Map[K, V]) Delete(k K)

func (Map[K, V]) First

func (m Map[K, V]) First() (K, V)

func (Map[K, V]) Get

func (m Map[K, V]) Get(k K) V

func (Map[K, V]) Iterate

func (m Map[K, V]) Iterate() iterator.Iterator[KVPair[K, V]]

func (Map[K, V]) Last

func (m Map[K, V]) Last() (K, V)

func (Map[K, V]) Len

func (m Map[K, V]) Len() int

func (Map[K, V]) Put

func (m Map[K, V]) Put(k K, v V)

Jump to

Keyboard shortcuts

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