TreeSearchResult<T extends Object> class

Represents the result of a search operation on a tree.

See also:

  • TreeSearchMatch, which holds the search match details of a single node and its subtree.
  • TreeController.search, which traverses a tree looking for nodes that match the given predicate.
Mixed-in types

Constructors

TreeSearchResult({required Map<T, TreeSearchMatch> matches, int totalNodeCount = 0, int totalMatchCount = 0})
Creates a TreeSearchResult.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
matches → Map<T, TreeSearchMatch>
A Map of node -> TreeSearchMatch that represents a direct or indirect match of a search operation on a tree.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalMatchCount → int
The total number of nodes that match the search predicate.
final
totalNodeCount → int
The total number of nodes visited by the traversal.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
hasMatch(T node) → bool
Whether node has a direct or indirect search match.
matchOf(T node) → TreeSearchMatch?
The search result match values of node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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