TrieNode<K, P extends Comparable<P>, V> class abstract

Abstract implementation of the nodes in a Trie.

Implementers

Constructors

TrieNode()

Properties

children Iterable<TrieNode<K, P, V>>
Ordered child nodes.
no setter
entries Iterable<MapEntry<K, V>>
An iterable over this node and all its children
no setter
hasChildren bool
Returns true, if the node has child nodes.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasKeyAndValue bool
Returns true, if the node has a key and value.
no setter
key → K
Returns the key of the node, if this node has a key and value.
no setter
parts Iterable<P>
Parts of the child nodes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → V
Returns the value of the node, if this node has a key and value.
no setter

Methods

addChild(P part) TrieNode<K, P, V>
Adds a new node with the provided part, or returns the existing one.
clearChildren() → void
Clears all the child nodes.
clearKeyAndValue() → void
Clears the key and value, if present.
getChild(P part) TrieNode<K, P, V>?
Returns the node with the provided part, or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeChild(P part) TrieNode<K, P, V>?
Returns the removed node with the provided part, or null.
setKeyAndValue(K key, V value) → void
Sets (or replaces) the key and value.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited