Class DeltaCollector
Utility class to construct a sequence of attached operations from a
matching.
Constructor
-
class DeltaCollector(matching, root_a, root_b)
Arguments: |
- matching –
- root_a –
- root_b –
|
Methods
equals
-
DeltaCollector#equals(a, b)
-
Default equality test. Override this method if you need to test other
node properties instead/beside node value.
forEachChange
-
DeltaCollector#forEachChange(callback, T, root_a, root_b, path)
Arguments: |
- callback –
- A function(type, path, removes, inserts) called
- for each detected set of changes.
- T – Context object bound to “this” when the callback is
- root_a – (internal use) Root node in tree a
- root_b –
- (internal use) Root node in tree b
- invoked.
- path –
- (internal use) current path relative to base node. Used
- from recursive calls.
|
Invoke a callback for each changeset detected between tree a and tree b
according to the given matching.