Documentation
¶
Index ¶
- type BiDict
- func (p *BiDict[K, V]) Clear()
- func (p *BiDict[K, V]) Clone() (k2v map[K]V, v2k map[V]K)
- func (p *BiDict[K, V]) DeleteByKey(key K)
- func (p *BiDict[K, V]) DeleteByVal(val V)
- func (p *BiDict[K, V]) GetByKey(key K) (val V, found bool)
- func (p *BiDict[K, V]) GetByVal(val V) (key K, found bool)
- func (p *BiDict[K, V]) Len() int
- func (p *BiDict[K, V]) Range(f func(K, V) bool)
- func (p *BiDict[K, V]) Set(key K, val V)
- type Dict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiDict ¶
type BiDict[K comparable, V comparable] struct { // contains filtered or unexported fields }
BiDict is goroutine safe bidirectional map
func NewBiDict ¶
func NewBiDict[K comparable, V comparable]() *BiDict[K, V]
func (*BiDict[K, V]) DeleteByKey ¶
func (p *BiDict[K, V]) DeleteByKey(key K)
func (*BiDict[K, V]) DeleteByVal ¶
func (p *BiDict[K, V]) DeleteByVal(val V)
type Dict ¶
type Dict[K comparable, V any] struct { // contains filtered or unexported fields }
Dict is goroutine safe map
func New ¶
func New[K comparable, V any]() *Dict[K, V]
Click to show internal directories.
Click to hide internal directories.