hashmap

package module
v0.0.0-...-63af0e0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2015 License: MIT Imports: 1 Imported by: 0

README

Build Status

hashmap

Simple implementation of HashMap in GoLang

Documentation

Overview

Simple implementation of HashMap in GoLang

Index

Constants

View Source
const BucketSize = 2 ^ 4

default number of buckets

Variables

This section is empty.

Functions

This section is empty.

Types

type HashMap

type HashMap struct {
	BucketSize int
	// contains filtered or unexported fields
}

func NewHashMap

func NewHashMap() *HashMap

Create new Hashmap

func (*HashMap) Delete

func (h *HashMap) Delete(key string)

Delete from the map using key

func (*HashMap) Get

func (h *HashMap) Get(key string) interface{}

Retrieve an item from the map using key

func (*HashMap) Put

func (h *HashMap) Put(key string, value interface{})

Put an item into the map

func (*HashMap) Size

func (h *HashMap) Size() int

Retrieve the numbers of key value mappings in the map

func (*HashMap) String

func (h *HashMap) String() string

Jump to

Keyboard shortcuts

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