Documentation
¶
Index ¶
- type Bimap
- func (b *Bimap[K, V]) Add(k K, v V)
- func (b *Bimap[K, V]) Clear()
- func (b *Bimap[K, V]) Each(f func(k K, v V))
- func (b *Bimap[K, V]) ForwardMap() map[K]V
- func (b *Bimap[K, V]) GetBackwards(v V) (K, bool)
- func (b *Bimap[K, V]) GetForward(k K) (V, bool)
- func (b *Bimap[K, V]) IsInitialized() bool
- func (b *Bimap[K, V]) RemoveBackwards(v V)
- func (b *Bimap[K, V]) RemoveForward(k K)
- func (b *Bimap[K, V]) ReverseMap() map[V]K
- func (b *Bimap[K, V]) Size() int
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]) ForwardMap ¶
func (b *Bimap[K, V]) ForwardMap() map[K]V
func (*Bimap[K, V]) GetBackwards ¶
func (*Bimap[K, V]) GetForward ¶
func (*Bimap[K, V]) IsInitialized ¶
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
Click to show internal directories.
Click to hide internal directories.