trie

package
v0.0.0-...-e39a43b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 4 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 {
	Key      string
	Parent   *Node
	Children *safemap.Map //nodeKey => Node
	// contains filtered or unexported fields
}

Node is the tree node of the Trie.

func NewNode

func NewNode() *Node

type Tree

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

Trie is a tree

func New

func New() *Tree

New returns a new Trie object.

func (*Tree) Del

func (trie *Tree) Del(pattern string) error

func (*Tree) Dump

func (trie *Tree) Dump()

func (*Tree) Empty

func (trie *Tree) Empty() bool

func (*Tree) Exist

func (trie *Tree) Exist(pattern string) (interface{}, bool)

func (*Tree) Match

func (trie *Tree) Match(pattern string) (interface{}, bool)

func (*Tree) Put

func (trie *Tree) Put(pattern string, entry interface{})

func (*Tree) SetDelimiter

func (trie *Tree) SetDelimiter(delimiter string)

SetDelimiter sets the delimiter of the trie object.

Jump to

Keyboard shortcuts

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