Package aQute.bnd.differ
Class Element
java.lang.Object
aQute.bnd.differ.Element
- All Implemented Interfaces:
Tree
,Comparable<Tree>
An element can be compared to another element of the same type. Elements with
the same name and same place in the hierarchy should have the same type. The
idea is that for a certain resource type you create an element (Structured or
Leaf). This process is done for the newer and older resource.
A Leaf type has a value, comparison is rather simple in this case.
A Structured type has named children. The comparison between the newer and older child elements is then done on their name. Two elements with the same name are then matched.
The classes are prepared for extension but so far it turned out to be unnecessary.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY
-
type
-
name
-
add
-
remove
-
comment
-
children
-
-
Constructor Details
-
Element
-
Element
-
Element
-
Element
-
Element
-
-
Method Details
-
serialize
-
getType
-
getName
-
getComment
String getComment() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Tree>
-
equals
-
hashCode
public int hashCode() -
getChildren
- Specified by:
getChildren
in interfaceTree
-
ifAdded
-
ifRemoved
-
diff
-
get
-
toString
-
toString
-