trie

package
Version: v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const END = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

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

func (*KV) Key

func (self *KV) Key() Hashable

func (*KV) KeyEq

func (self *KV) KeyEq(key ByteSlice) bool

func (*KV) Value

func (self *KV) Value() interface{}

type TST

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

func New

func New() *TST

func (*TST) Dotty

func (self *TST) Dotty() string

func (*TST) Get

func (self *TST) Get(key []byte) (value interface{}, err error)

func (*TST) Has

func (self *TST) Has(key []byte) bool

func (*TST) Items

func (self *TST) Items() (vi KIterator)

func (*TST) Iterate

func (self *TST) Iterate() KVIterator

func (*TST) Keys

func (self *TST) Keys() KIterator

func (*TST) PrefixFind

func (self *TST) PrefixFind(prefix ByteSlice) KVIterator

func (*TST) Put

func (self *TST) Put(key []byte, value interface{}) (err error)

func (*TST) Remove

func (self *TST) Remove(key []byte) (value interface{}, err error)

func (*TST) String

func (self *TST) String() string

func (*TST) ValidateKey

func (self *TST) ValidateKey(key []byte) error

func (*TST) Values

func (self *TST) Values() Iterator

type TSTNode

type TSTNode struct {
	KV
	// contains filtered or unexported fields
}

func NewAcceptingTSTNode

func NewAcceptingTSTNode(ch byte, key ByteSlice, value interface{}) *TSTNode

func NewTSTNode

func NewTSTNode(ch byte) *TSTNode

func (*TSTNode) ChildCount

func (self *TSTNode) ChildCount() int

func (*TSTNode) Children

func (self *TSTNode) Children() TreeNodeIterator

func (*TSTNode) Copy

func (self *TSTNode) Copy() *TSTNode

func (*TSTNode) GetChild

func (self *TSTNode) GetChild(i int) TreeNode

func (*TSTNode) Internal

func (self *TSTNode) Internal() bool

func (*TSTNode) String

func (self *TSTNode) String() string

Source Files

Jump to

Keyboard shortcuts

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