bmap

package
v1.2.69 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BMap

type BMap[Key cmp.Ordered, Value any] Entries[Key, Value]

func New

func New[Key cmp.Ordered, Value any]() BMap[Key, Value]

func (*BMap[Key, Value]) Add

func (b *BMap[Key, Value]) Add(key Key, val Value)

func (*BMap[Key, Value]) Foreach

func (b *BMap[Key, Value]) Foreach(fn func(key Key, values []Value))

func (*BMap[Key, Value]) Get

func (b *BMap[Key, Value]) Get(key Key) (v Value, found bool)

func (*BMap[Key, Value]) Len

func (b *BMap[Key, Value]) Len() int

func (*BMap[Key, Value]) Remove

func (b *BMap[Key, Value]) Remove(key Key)

func (*BMap[Key, Value]) Set

func (b *BMap[Key, Value]) Set(key Key, val Value)

func (*BMap[Key, Value]) Values

func (b *BMap[Key, Value]) Values(key Key) ([]Value, bool)

type Entries

type Entries[Key cmp.Ordered, Value any] []Entry[Key, Value]

func (Entries[Key, Value]) Len

func (e Entries[Key, Value]) Len() int

func (Entries[Key, Value]) Less

func (e Entries[Key, Value]) Less(i, j int) bool

func (Entries[Key, Value]) Swap

func (e Entries[Key, Value]) Swap(i, j int)

type Entry

type Entry[Key cmp.Ordered, Value any] struct {
	Key    Key
	Values []Value
}

Jump to

Keyboard shortcuts

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