prefixtree

package
v0.0.0-...-b26f8fd Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: Apache-2.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 Node

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

Node is a node of a prefix tree

func NewNode

func NewNode(key, value interface{}, parent *Node) *Node

NewNode will create a prefix tree node struct

type PrefixTree

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

PrefixTree is a prefix tree datastruct

func NewPrefixTree

func NewPrefixTree() *PrefixTree

NewPrefixTree new a prefix tree

func (*PrefixTree) Add

func (p *PrefixTree) Add(keys []interface{}, value interface{})

Add a node into this prefix tree

func (*PrefixTree) Del

func (p *PrefixTree) Del(keys []interface{})

Del a node of the prefix tree

func (*PrefixTree) Get

func (p *PrefixTree) Get(keys []interface{}) interface{}

Get a node's value of prefix tree

func (*PrefixTree) IsEmpty

func (p *PrefixTree) IsEmpty() bool

IsEmpty return prefix tree is empty

func (*PrefixTree) Update

func (p *PrefixTree) Update(keys []interface{}, value interface{})

Update a node of prefix tree.

Jump to

Keyboard shortcuts

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