hashtable

package
v0.0.0-...-70d8496 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2019 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hashtable_t

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

func MkHash

func MkHash(size int) *Hashtable_t

func (*Hashtable_t) Del

func (ht *Hashtable_t) Del(key interface{})

returns true if the key was removed

func (*Hashtable_t) Elems

func (ht *Hashtable_t) Elems() []Pair_t

func (*Hashtable_t) Get

func (ht *Hashtable_t) Get(key interface{}) (interface{}, bool)

func (*Hashtable_t) GetRLock

func (ht *Hashtable_t) GetRLock(key interface{}) (interface{}, bool)

For performance comparisons

func (*Hashtable_t) Iter

func (ht *Hashtable_t) Iter(f func(interface{}, interface{}) bool) bool

Returns true if at least one call to f returned true. stops iterating once f returns true.

func (*Hashtable_t) Set

func (ht *Hashtable_t) Set(key interface{}, value interface{}) (interface{}, bool)

Set returns false if key already exists

func (*Hashtable_t) Size

func (ht *Hashtable_t) Size() int

func (*Hashtable_t) String

func (ht *Hashtable_t) String() string

type Pair_t

type Pair_t struct {
	Key   interface{}
	Value interface{}
}

Jump to

Keyboard shortcuts

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