hashmap

package
v0.0.0-...-eb83806 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 2 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 struct {
	// contains filtered or unexported fields
}

HashMap is a Golang implementation of a hashmap

func DefaultNew

func DefaultNew() *HashMap

DefaultNew returns a new HashMap instance with default values

func New

func New(size, capacity uint64) *HashMap

New creates a new HashMap instance with the specified size and capacity

func (*HashMap) Contains

func (hm *HashMap) Contains(key any) bool

Contains checks if the given key is stored in the hashmap

func (*HashMap) Get

func (hm *HashMap) Get(key any) any

Get returns the value associated with the given key

func (*HashMap) Put

func (hm *HashMap) Put(key, value any)

Put inserts a new key-value pair into the hashmap

Jump to

Keyboard shortcuts

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