Class DiffImpl

java.lang.Object
aQute.bnd.differ.DiffImpl
All Implemented Interfaces:
Diff, Comparable<DiffImpl>, Formattable

public class DiffImpl extends Object implements Diff, Comparable<DiffImpl>, Formattable
A DiffImpl class compares a newer Element to an older Element. The Element classes hide all the low level details. A Element class is either either Structured (has children) or it is a Leaf, it only has a value. The constructor will first build its children (if any) and then calculate the delta. Each comparable element is translated to an Element. If necessary the Element can be sub classed to provide special behavior.
  • Field Details

    • older

      final Tree older
    • newer

      final Tree newer
    • children

      final List<Diff> children
    • delta

      final Delta delta
    • TRANSITIONS

      static final Delta[][] TRANSITIONS
      The transitions table defines how the state is escalated depending on the children. horizontally is the current delta and this is indexed with the child delta for each child. This escalates deltas from below up.
  • Constructor Details

    • DiffImpl

      public DiffImpl(Tree newer, Tree older)
      Compares the newer against the older, traversing the children if necessary.
      Parameters:
      newer - The newer Element
      older - The older Element
  • Method Details