Documentation
¶
Overview ¶
Package bimap provides a bidirectional map implementation.
Index ¶
- type BiMap
- func (b *BiMap[K, V]) Delete(key K) bool
- func (b *BiMap[K, V]) DeleteValue(value V) bool
- func (b *BiMap[K, V]) Get(key K) (V, bool)
- func (b *BiMap[K, V]) GetKey(value V) (K, bool)
- func (b *BiMap[K, V]) GetValue(key K) (V, bool)
- func (b *BiMap[K, V]) HasKey(key K) bool
- func (b *BiMap[K, V]) HasValue(value V) bool
- func (b *BiMap[K, V]) Keys() []K
- func (b *BiMap[K, V]) Len() int
- func (b *BiMap[K, V]) Put(key K, value V) bool
- func (b *BiMap[K, V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiMap ¶
type BiMap[K comparable, V comparable] struct { // contains filtered or unexported fields }
BiMap is a bidirectional map that allows lookups in both directions.
func (*BiMap[K, V]) DeleteValue ¶
DeleteValue removes the key-value pair by value.
Click to show internal directories.
Click to hide internal directories.