bytrie

package
v0.0.0-...-04bc891 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2013 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

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

A 'map' structure, that can hold []byte objects. For any one []byte instance, it is either in the set or not.

func New

func New() *Trie

func (*Trie) Delete

func (self *Trie) Delete(key string) (value []byte)

Remove `key` from the map. If there are no instances of `key`, this does nothing. Return value.

func (*Trie) Get

func (self *Trie) Get(key []byte) []byte

Returns the value of `key` in the map.

func (*Trie) Members

func (self *Trie) Members(prefix []byte) (els [][]byte)

Retrieve all values of the map, with keys starting with prefix, unordered.

func (*Trie) Set

func (self *Trie) Set(key []byte, value []byte)

Add `key` to the map, with `value` as value. If `key` is already a member, this overwrites existing value

Jump to

Keyboard shortcuts

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