Package aQute.bnd.differ
Class DiffImpl
java.lang.Object
aQute.bnd.differ.DiffImpl
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface aQute.bnd.service.diff.Diff
Diff.Data, Diff.Ignore
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
private static void
format
(Formatter formatter, Diff diff, List<String> formats, Set<Delta> deltas, int indent, int depth) void
getDelta()
Return the absolute delta.getDelta
(Diff.Ignore ignore) This getDelta calculates the delta but allows the caller to ignore certain Diff objects by calling back the ignore call back parameter.getName()
getNewer()
getOlder()
getType()
int
hashCode()
toString()
-
Field Details
-
older
-
newer
-
children
-
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
Compares the newer against the older, traversing the children if necessary.- Parameters:
newer
- The newer Elementolder
- The older Element
-
-
Method Details
-
getDelta
Return the absolute delta. Also seegetDelta(aQute.bnd.service.diff.Diff.Ignore)
that allows you to ignore Diff objects on the fly (and calculate their parents accordingly). -
getDelta
This getDelta calculates the delta but allows the caller to ignore certain Diff objects by calling back the ignore call back parameter. This can be useful to ignore warnings/errors. -
getType
-
getName
-
getChildren
- Specified by:
getChildren
in interfaceDiff
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<DiffImpl>
-
get
-
getOlder
-
getNewer
-
serialize
-
formatTo
- Specified by:
formatTo
in interfaceFormattable
-
format
-