TreeNode<T> class
Properties
-
children
→ Iterable<TreeNode<T>>
-
List of child nodes.
no setter
-
data
→ T
-
Associated data this node stores.
final
-
depth
↔ int
-
Distance between this node and the root node.
getter/setter pair
-
hasChildren
→ bool
-
Whether or not this node has any children.
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
parent
↔ TreeNode<T>?
-
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addChild(TreeNode<T> child)
→ void
-
Adds a single child to this node.
-
addChildren(Iterable<TreeNode<T>> newChildren)
→ void
-
Adds a list of children to this node.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
visit(void f(TreeNode<T> node))
→ void
-
Applies the function
f
to all child nodes rooted from this node in
breadth first order.