quickmap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuickMap

type QuickMap struct {
	// contains filtered or unexported fields
}

QuickMap represents a hash table

func New

func New() *QuickMap

creates and returns a new QuickMap

func NewWithCapacity

func NewWithCapacity(initialCapacity int) *QuickMap

NewWithCapacity creates and returns a new QuickMap with the specified initial capacity

func (*QuickMap) Delete

func (m *QuickMap) Delete(key string)

Delete removes a key-value pair from the map

func (*QuickMap) DeleteMany

func (m *QuickMap) DeleteMany(keys []string)

DeleteMany removes multiple keys from the map

func (*QuickMap) ForEach

func (m *QuickMap) ForEach(f func(key string, value interface{}))

ForEach iterates over all key-value pairs in the QuickMap and applies the given function

func (*QuickMap) Get

func (m *QuickMap) Get(key string) (interface{}, bool)

Get retrieves a value by key

func (*QuickMap) Insert

func (m *QuickMap) Insert(key string, value interface{})

Insert adds a new key-value pair to our map

func (*QuickMap) InsertMany

func (m *QuickMap) InsertMany(pairs map[string]interface{})

InsertMany adds multiple key-value pairs to the map

func (*QuickMap) Size

func (m *QuickMap) Size() int

Size returns the number of elements in the QuickMap

Jump to

Keyboard shortcuts

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