orderedmap

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

README

OrderedMap

Simple implementation of any orderedmap. Effective for small size of data. For better result with specific rank algorithms take a look on sortedset. Thread-safe implementation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderedMap

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

func (*OrderedMap[K, V]) Add

func (o *OrderedMap[K, V]) Add(key K, val V)

func (*OrderedMap[K, V]) Copy

func (o *OrderedMap[K, V]) Copy() *OrderedMap[K, V]

func (*OrderedMap[K, V]) Exists

func (o *OrderedMap[K, V]) Exists(key K) bool

func (*OrderedMap[K, V]) Get

func (o *OrderedMap[K, V]) Get(key K) V

func (*OrderedMap[K, V]) GetAll

func (o *OrderedMap[K, V]) GetAll() ([]K, []V)

func (*OrderedMap[K, V]) GetMap

func (o *OrderedMap[K, V]) GetMap() map[K]V

func (*OrderedMap[K, V]) Iterator

func (o *OrderedMap[K, V]) Iterator(size int) chan V

func (*OrderedMap[K, V]) Remove

func (o *OrderedMap[K, V]) Remove(key K)

func (*OrderedMap[K, V]) SetAll

func (o *OrderedMap[K, V]) SetAll(values []V)

func (*OrderedMap[K, V]) SetKeys

func (o *OrderedMap[K, V]) SetKeys(keys []K, def V)

func (*OrderedMap[K, V]) Size

func (o *OrderedMap[K, V]) Size() int

func (*OrderedMap[K, V]) Truncate

func (o *OrderedMap[K, V]) Truncate()

Jump to

Keyboard shortcuts

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