Documentation
¶
Index ¶
- Constants
- type Config
- type HashMap
- func (hm *HashMap[K, V]) All() iter.Seq2[K, V]
- func (hm *HashMap[K, V]) Empty() bool
- func (hm *HashMap[K, V]) Get(key K) (V, bool)
- func (hm *HashMap[K, V]) Keys() iter.Seq[K]
- func (hm *HashMap[K, V]) Put(key K, value V)
- func (hm *HashMap[K, V]) Remove(key K)
- func (hm *HashMap[K, V]) Size() int
- func (hm *HashMap[K, V]) Values() iter.Seq[V]
- type MapWrapper
- func (hm *MapWrapper[K, V]) All() iter.Seq2[K, V]
- func (hm *MapWrapper[K, V]) Empty() bool
- func (hm *MapWrapper[K, V]) Get(key K) (V, bool)
- func (hm *MapWrapper[K, V]) Keys() iter.Seq[K]
- func (hm *MapWrapper[K, V]) Put(key K, value V)
- func (hm *MapWrapper[K, V]) Remove(key K)
- func (hm *MapWrapper[K, V]) Size() int
- func (hm *MapWrapper[K, V]) Values() iter.Seq[V]
- type Opt
Constants ¶
View Source
const ( DefaultCapacity = 10 DefaultLoadFactor = 0.75 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap[K comparable, V any] struct { // contains filtered or unexported fields }
type MapWrapper ¶
type MapWrapper[K comparable, V any] struct { // contains filtered or unexported fields }
func Wrap ¶
func Wrap[K comparable, V any](m map[K]V) *MapWrapper[K, V]
func (*MapWrapper[K, V]) All ¶
func (hm *MapWrapper[K, V]) All() iter.Seq2[K, V]
func (*MapWrapper[K, V]) Empty ¶
func (hm *MapWrapper[K, V]) Empty() bool
func (*MapWrapper[K, V]) Get ¶
func (hm *MapWrapper[K, V]) Get(key K) (V, bool)
func (*MapWrapper[K, V]) Keys ¶
func (hm *MapWrapper[K, V]) Keys() iter.Seq[K]
func (*MapWrapper[K, V]) Put ¶
func (hm *MapWrapper[K, V]) Put(key K, value V)
func (*MapWrapper[K, V]) Remove ¶
func (hm *MapWrapper[K, V]) Remove(key K)
func (*MapWrapper[K, V]) Size ¶
func (hm *MapWrapper[K, V]) Size() int
func (*MapWrapper[K, V]) Values ¶
func (hm *MapWrapper[K, V]) Values() iter.Seq[V]
Click to show internal directories.
Click to hide internal directories.