PruneForest class final

A tree of prune (true) and keep (false) marks; a mark applies to its whole subtree unless a deeper mark overrides it.

Constructors

PruneForest()
An empty forest (prunes nothing).
factory
PruneForest.fromTree(ImmutableTree<bool> forest)
Wraps forest.
const

Properties

forest → ImmutableTree<bool>
The marks.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

affectsPath(Path path) → bool
Whether any mark lies on or below path.
child(ChildKey key) → PruneForest
The forest at child key.
childAtPath(Path path) → PruneForest
The forest at path.
foldKeptNodes<R>(R initial, R fn(Path path, R accumulator)) → R
Folds fn over the kept paths.
keep(Path path) → PruneForest
With path kept.
keepAll(Path path, Set<ChildKey> children) → PruneForest
With each of children of path kept.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune(Path path) → PruneForest
With path pruned.
pruneAll(Path path, Set<ChildKey> children) → PruneForest
With each of children of path pruned.
prunesAnything() → bool
Whether anything is pruned.
shouldKeep(Path path) → bool
Whether path is kept.
shouldPruneUnkeptDescendants(Path path) → bool
Whether data below path that is not kept should be pruned.
toString() → String
A string representation of this object.
override

Operators

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