Documentation ¶
Index ¶
- type BiMap
- func (bm *BiMap) DelByKey(key any) error
- func (bm *BiMap) DelByVal(value any) error
- func (bm *BiMap) GetKeyByVal(value any) any
- func (bm *BiMap) GetValByKey(key any) any
- func (bm *BiMap) IsEqual(otherBm BiMap) bool
- func (bm *BiMap) Keys() []any
- func (bm *BiMap) Left() map[any]any
- func (bm *BiMap) Right() map[any]any
- func (bm *BiMap) Set(key any, value any) error
- func (bm *BiMap) Size() int
- func (bm *BiMap) Vals() []any
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiMap ¶
type BiMap struct {
// contains filtered or unexported fields
}
BiMap is a bi-directional map
func (*BiMap) DelByKey ¶
DelByKey deletes a key-value pair from a key. Returns an error if provided argument is not a key
func (*BiMap) DelByVal ¶
DelByVal deletes a key-value pair from a value. Returns an error if provided argument is not a value
func (*BiMap) GetKeyByVal ¶
GetKeyByVal gets a key from a value
func (*BiMap) GetValByKey ¶
GetValByKey gets a value from a key
Click to show internal directories.
Click to hide internal directories.