bimap

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bimap

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

func New

func New[K, V comparable]() Bimap[K, V]

func Of

func Of[K, V comparable](m map[K]V) Bimap[K, V]

func (*Bimap[K, V]) Add

func (b *Bimap[K, V]) Add(k K, v V)

func (*Bimap[K, V]) Clear

func (b *Bimap[K, V]) Clear()

func (*Bimap[K, V]) Each

func (b *Bimap[K, V]) Each(f func(k K, v V))

func (*Bimap[K, V]) ForwardMap

func (b *Bimap[K, V]) ForwardMap() map[K]V

func (*Bimap[K, V]) GetBackwards

func (b *Bimap[K, V]) GetBackwards(v V) (K, bool)

func (*Bimap[K, V]) GetForward

func (b *Bimap[K, V]) GetForward(k K) (V, bool)

func (*Bimap[K, V]) IsInitialized

func (b *Bimap[K, V]) IsInitialized() bool

func (*Bimap[K, V]) RemoveBackwards

func (b *Bimap[K, V]) RemoveBackwards(v V)

func (*Bimap[K, V]) RemoveForward

func (b *Bimap[K, V]) RemoveForward(k K)

func (*Bimap[K, V]) ReverseMap

func (b *Bimap[K, V]) ReverseMap() map[V]K

func (*Bimap[K, V]) Size

func (b *Bimap[K, V]) Size() int

Jump to

Keyboard shortcuts

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