Class AbstractDifferenceList
- java.lang.Object
-
- org.openscience.cdk.tools.diff.tree.AbstractDifferenceList
-
- All Implemented Interfaces:
IDifference
,IDifferenceList
- Direct Known Subclasses:
BooleanArrayDifference
,ChemObjectDifference
,Point2dDifference
,Point3dDifference
public abstract class AbstractDifferenceList extends Object implements IDifferenceList
Diff between two IChemObjects.- Author:
- egonw
- Source code:
- main
- Belongs to CDK module:
- diff
-
-
Field Summary
Fields Modifier and Type Field Description protected List<IDifference>
differences
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDifferenceList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(IDifference childDiff)
Adds a newIDifference
as child to this tree.void
addChildren(List<IDifference> children)
Adds multipleIDifference
s as child to this tree.int
childCount()
Returns the number of children of thisIDifference
.Iterable<IDifference>
getChildren()
-
-
-
Field Detail
-
differences
protected final List<IDifference> differences
-
-
Method Detail
-
addChild
public void addChild(IDifference childDiff)
Adds a newIDifference
as child to this tree. For example, anIAtom
difference would have a child difference forPoint2d
.- Specified by:
addChild
in interfaceIDifferenceList
- Parameters:
childDiff
- childIDifference
to add to thisIDifference
-
addChildren
public void addChildren(List<IDifference> children)
Adds multipleIDifference
s as child to this tree.- Specified by:
addChildren
in interfaceIDifferenceList
- Parameters:
children
- aList
ofIDifference
s to add to thisIDifference
-
getChildren
public Iterable<IDifference> getChildren()
- Specified by:
getChildren
in interfaceIDifferenceList
- Returns:
- an
Iterable
implementation with all children
-
childCount
public int childCount()
Returns the number of children of thisIDifference
.- Specified by:
childCount
in interfaceIDifferenceList
- Returns:
- an int reflecting the number of children
-
-