Documentation ¶
Index ¶
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 represents a bidirectional map
func NewBiMap ¶
func NewBiMap[K comparable, V comparable]() *BiMap[K, V]
NewBiMap creates a new BiMap
func NewBiMapFromMap ¶
func NewBiMapFromMap[K comparable, V comparable](m map[K]V) *BiMap[K, V]
NewBiMapFromMap NewBiMap creates a new BiMap from a map.
func (*BiMap[K, V]) GetByValue ¶
GetByValue retrieves the key for a given value
func (*BiMap[K, V]) GetKeys ¶
func (b *BiMap[K, V]) GetKeys() []K
GetKeys returns all keys of the BiMap
Click to show internal directories.
Click to hide internal directories.