aQute.bnd.differ
Class DiffImpl
java.lang.Object
aQute.bnd.differ.DiffImpl
- All Implemented Interfaces:
- Diff, Comparable<DiffImpl>
public class DiffImpl
- extends Object
- implements Diff, Comparable<DiffImpl>
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.
|
Constructor Summary |
DiffImpl(Tree newer,
Tree older)
Compares the newer against the older, traversing the children if
necessary. |
DiffImpl
public DiffImpl(Tree newer,
Tree older)
- Compares the newer against the older, traversing the children if
necessary.
- Parameters:
newer - The newer Elementolder - The older Elementtypes -
getDelta
public Delta getDelta()
- Return the absolute delta. Also see
getDelta(aQute.bnd.service.diff.Diff.Ignore) that allows you to
ignore Diff objects on the fly (and calculate their parents accordingly).
- Specified by:
getDelta in interface Diff
getDelta
public 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. This
can be useful to ignore warnings/errors.
- Specified by:
getDelta in interface Diff
getType
public Type getType()
- Specified by:
getType in interface Diff
getName
public String getName()
- Specified by:
getName in interface Diff
getChildren
public Collection<? extends Diff> getChildren()
- Specified by:
getChildren in interface Diff
toString
public String toString()
- Overrides:
toString in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
compareTo
public int compareTo(DiffImpl other)
- Specified by:
compareTo in interface Comparable<DiffImpl>
get
public Diff get(String name)
- Specified by:
get in interface Diff
getOlder
public Tree getOlder()
- Specified by:
getOlder in interface Diff
getNewer
public Tree getNewer()
- Specified by:
getNewer in interface Diff
serialize
public Diff.Data serialize()
- Specified by:
serialize in interface Diff
Copyright © 2014 aQute SARL. All rights reserved.