Documentation ¶
Index ¶
- type HashMap
- func (m *HashMap[K, V]) Compute(k K, compute func(k K, vop optional.Optional[V]) optional.Optional[V]) optional.Optional[V]
- func (m *HashMap[K, V]) ComputeIfAbsent(k K, compute func(k K, vop optional.Optional[V]) optional.Optional[V]) optional.Optional[V]
- func (m *HashMap[K, V]) Contains(k K) bool
- func (m *HashMap[K, V]) Get(k K) optional.Optional[V]
- func (m *HashMap[K, V]) GetOrDefault(k K, defaultValue V) V
- func (m *HashMap[K, V]) Put(k K, v V) optional.Optional[V]
- func (m *HashMap[K, V]) Remove(k K) optional.Optional[V]
- func (m *HashMap[K, V]) Size() int
- func (m *HashMap[K, V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap[K comparable, V any] map[K]V
func New ¶
func New[K comparable, V any]() *HashMap[K, V]
func (*HashMap[K, V]) ComputeIfAbsent ¶
func (*HashMap[K, V]) GetOrDefault ¶
func (m *HashMap[K, V]) GetOrDefault(k K, defaultValue V) V
Click to show internal directories.
Click to hide internal directories.