boundlessgeo/GeoGit — pull request #700 by groldan (2014-04-17 17:35:40+00:00)
Title: Cleaner and possibly faster way to traverse diffs.

Introduces DiffTreeVisitor which traverses two trees in parallel, calling
a method of a provided DiffTreeVisitor.Consumer for each diff encountered
(either a pair tree or feature Node, or Bucket), allowing the traversal
to skip whole subtrees (both named subtrees or buckets subtrees) at the
discretion of the Consumer implementation, as opposed to the traditional
Iterator approach (still used to report diffs).

Adapted DiffBounds and DiffCount to use it, resulting in simpler code both
and over 100 less lines of code for DiffCount, both being potentially much
more efficient.

DiffTreeVisitor comes with over 97% unit test coverage.