bimap

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

from: https://github.com/vishalkuo/bimap

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BiMap

type BiMap[K hashable, V hashable] struct {
	// contains filtered or unexported fields
}

func New

func New[K hashable, V hashable]() *BiMap[K, V]

func NewFromMap

func NewFromMap[K hashable, V hashable](f map[K]V) *BiMap[K, V]

func (*BiMap[K, V]) Delete

func (b *BiMap[K, V]) Delete(k K) bool

func (*BiMap[K, V]) DeleteInverse

func (b *BiMap[K, V]) DeleteInverse(v V) bool

func (*BiMap[K, V]) Exists

func (b *BiMap[K, V]) Exists(k K) bool

func (*BiMap[K, V]) ExistsInverse

func (b *BiMap[K, V]) ExistsInverse(k V) bool

func (*BiMap[K, V]) Get

func (b *BiMap[K, V]) Get(k K) (V, bool)

func (*BiMap[K, V]) GetForwardMap

func (b *BiMap[K, V]) GetForwardMap() map[K]V

func (*BiMap[K, V]) GetInverse

func (b *BiMap[K, V]) GetInverse(v V) (K, bool)

func (*BiMap[K, V]) GetInverseMap

func (b *BiMap[K, V]) GetInverseMap() map[V]K

func (*BiMap[K, V]) Insert

func (b *BiMap[K, V]) Insert(k K, v V) bool

func (*BiMap[K, V]) MakeImmutable

func (b *BiMap[K, V]) MakeImmutable()

func (*BiMap[K, V]) Reset

func (b *BiMap[K, V]) Reset()

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