hashmap

package
v1.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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]) Compute

func (m *HashMap[K, V]) Compute(k K, compute func(k K, vop optional.Optional[V]) optional.Optional[V]) optional.Optional[V]

func (*HashMap[K, V]) ComputeIfAbsent

func (m *HashMap[K, V]) ComputeIfAbsent(k K, compute func(k K, vop optional.Optional[V]) optional.Optional[V]) optional.Optional[V]

func (*HashMap[K, V]) Contains

func (m *HashMap[K, V]) Contains(k K) bool

func (*HashMap[K, V]) Get

func (m *HashMap[K, V]) Get(k K) optional.Optional[V]

func (*HashMap[K, V]) GetOrDefault

func (m *HashMap[K, V]) GetOrDefault(k K, defaultValue V) V

func (*HashMap[K, V]) Put

func (m *HashMap[K, V]) Put(k K, v V) optional.Optional[V]

func (*HashMap[K, V]) Remove

func (m *HashMap[K, V]) Remove(k K) optional.Optional[V]

func (*HashMap[K, V]) Size

func (m *HashMap[K, V]) Size() int

func (*HashMap[K, V]) Values

func (m *HashMap[K, V]) Values() []V

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL