android-components / mozilla.components.browser.engine.system.matcher / Trie

Trie

open class Trie (source)

Simple implementation of a Trie, used for indexing URLs.

Constructors

Name Summary
<init> Trie(character: Char, parent: Trie?)
Simple implementation of a Trie, used for indexing URLs.

Properties

Name Summary
children val children: <ERROR CLASS>

Functions

Name Summary
createNode open fun createNode(character: Char, parent: Trie): Trie
Creates a new node for the provided character and parent node.
findNode fun findNode(string: String): Trie?
fun findNode(string: ReversibleString): Trie?
Finds the node corresponding to the provided string.
put fun put(string: String): Trie
fun put(string: ReversibleString): Trie
Adds new nodes (recursively) for all chars in the provided string.fun put(character: Char): Trie
Adds a new node for the provided character if none exists.

Companion Object Functions

Name Summary
createRootNode fun createRootNode(): Trie
Creates a new root node.