pruneAll method

PruneForest pruneAll(
  1. Path path,
  2. Set<ChildKey> children
)

With each of children of path pruned.

Implementation

PruneForest pruneAll(Path path, Set<ChildKey> children) {
  if (forest.rootMostValueMatching(path, _keepPredicate) != null) {
    throw ArgumentError("Can't prune path that was kept previously!");
  }
  if (forest.rootMostValueMatching(path, _prunePredicate) != null) {
    // This path will already be pruned.
    return this;
  }
  return _doAll(path, children, _pruneTree);
}