Class TreeNode<MoleculeType>
java.lang.Object
org.openscience.cdk.tools.scaffold.ScaffoldNodeBase<MoleculeType>
org.openscience.cdk.tools.scaffold.TreeNode<MoleculeType>
- Type Parameters:
- MoleculeType- As MoleculeType, any data type can be defined. In our scenario, the node contains a CDK IAtomContainer.
The TreeNodes are nodes from which a 
ScaffoldTree can be built.
 It is used to organise the IAtomContainers and enables a relationship between the different objects.
 A TreeNode can have different children but only one parent.
 The parents are the smaller parent scaffolds.- Version:
- 1.0.0.0
- Author:
- Julian Zander, Jonas Schaub (zanderjulian@gmx.de, jonas.schaub@uni-jena.de)
- 
Field SummaryFields inherited from class org.openscience.cdk.tools.scaffold.ScaffoldNodeBasechildren, molecule, nonVirtualOriginSmilesList, originSmilesList
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddChild(MoleculeType aMolecule) Adds a child to the tree node, i.e. links it to a node on the level below.intgetLevel()Outputs the level on which the node is located in the graph structure.Get the parent node.booleanisOrphan()Shows if the node has parents.voidsetParent(TreeNode<MoleculeType> aParent) Set the parent node.Methods inherited from class org.openscience.cdk.tools.scaffold.ScaffoldNodeBaseaddNonVirtualOriginSmiles, addOriginSmiles, getChildren, getMolecule, getNonVirtualOriginCount, getNonVirtualOriginSmilesList, getOriginCount, getOriginSmilesList, hasNonVirtualOriginSmiles, isLeaf, setChildren, setMolecule, setNonVirtualOriginSmilesList, setOriginSmilesList
- 
Constructor Details- 
TreeNodeConstructor- Parameters:
- aMolecule- molecule of the TreeNode
 
 
- 
- 
Method Details- 
isOrphanpublic boolean isOrphan()Shows if the node has parents. Description copied fromScaffoldNodeBase.- Specified by:
- isOrphanin class- ScaffoldNodeBase<MoleculeType>
- Returns:
- Whether the node has parents
 
- 
addChildAdds a child to the tree node, i.e. links it to a node on the level below. Description copied fromScaffoldNodeBase.- Specified by:
- addChildin class- ScaffoldNodeBase<MoleculeType>
- Parameters:
- aMolecule- Molecule of the child
- Returns:
- Node of the child
- Throws:
- NullPointerException- if parameter is null
 
- 
getLevelpublic int getLevel()Outputs the level on which the node is located in the graph structure. The level indicates the distance to the root (node without parents) and is determined by setting the level of the parent node + 1. The root itself has the level 0. The level is therefore dependent on the data structure and does not have to be set. Description copied fromScaffoldNodeBase.- Specified by:
- getLevelin class- ScaffoldNodeBase<MoleculeType>
- Returns:
- level of the node in the entire node collection
 
- 
getParentGet the parent node.- Returns:
- parent node
 
- 
setParentSet the parent node.- Parameters:
- aParent- parent that are set
- Throws:
- NullPointerException- if parameter is null
 
 
-