Documentation
¶
Index ¶
- type Node
- type NodeIterator
- type TernarySearchTree
- func (this *TernarySearchTree) Do(callback func(string, interface{}) bool)
- func (this *TernarySearchTree) Get(key string) interface{}
- func (this *TernarySearchTree) GetLongestPrefix(key string) interface{}
- func (this *TernarySearchTree) Has(key string) bool
- func (this *TernarySearchTree) Init()
- func (this *TernarySearchTree) Insert(key string, value interface{})
- func (this *TernarySearchTree) Len() int
- func (this *TernarySearchTree) Remove(key string) interface{}
- func (this *TernarySearchTree) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeIterator ¶
type NodeIterator struct {
// contains filtered or unexported fields
}
type TernarySearchTree ¶
type TernarySearchTree struct {
// contains filtered or unexported fields
}
func (*TernarySearchTree) Do ¶
func (this *TernarySearchTree) Do(callback func(string, interface{}) bool)
Iterate over the collection
func (*TernarySearchTree) Get ¶
func (this *TernarySearchTree) Get(key string) interface{}
Get the value at the specified key. Returns nil if not found.
func (*TernarySearchTree) GetLongestPrefix ¶
func (this *TernarySearchTree) GetLongestPrefix(key string) interface{}
func (*TernarySearchTree) Has ¶
func (this *TernarySearchTree) Has(key string) bool
Test to see whether or not the given key is contained in the tree.
func (*TernarySearchTree) Init ¶
func (this *TernarySearchTree) Init()
Initialize the tree (reset it so that it's empty). New will do this for you.
func (*TernarySearchTree) Insert ¶
func (this *TernarySearchTree) Insert(key string, value interface{})
Insert a new key value pair into the collection
func (*TernarySearchTree) Len ¶
func (this *TernarySearchTree) Len() int
Get the number of items stored in the tree
func (*TernarySearchTree) Remove ¶
func (this *TernarySearchTree) Remove(key string) interface{}
Remove a key from the collection
func (*TernarySearchTree) String ¶
func (this *TernarySearchTree) String() string
Click to show internal directories.
Click to hide internal directories.