org.jgap.gp.impl
Class JGAPTreeNode
- java.lang.Object
-
- org.jgap.gp.impl.JGAPTreeNode
-
- All Implemented Interfaces:
- javax.swing.tree.TreeNode
public class JGAPTreeNode extends java.lang.Object implements javax.swing.tree.TreeNodeA CommandGene represented as a tree node.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor and Description JGAPTreeNode(ProgramChromosome a_chrom, int a_index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Enumerationchildren()booleangetAllowsChildren()javax.swing.tree.TreeNodegetChildAt(int a_childIndex)intgetChildCount()intgetIndex(javax.swing.tree.TreeNode a_node)java.lang.StringgetName()javax.swing.tree.TreeNodegetParent()booleanisLeaf()
-
-
-
Constructor Detail
-
JGAPTreeNode
public JGAPTreeNode(ProgramChromosome a_chrom, int a_index)
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getChildAt
public javax.swing.tree.TreeNode getChildAt(int a_childIndex)
- Specified by:
getChildAtin interfacejavax.swing.tree.TreeNode- Parameters:
a_childIndex- index of the child to get- Returns:
- the child TreeNode at index a_childIndex
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfacejavax.swing.tree.TreeNode- Returns:
- the number of children
TreeNodes the receiver contains
-
getParent
public javax.swing.tree.TreeNode getParent()
- Specified by:
getParentin interfacejavax.swing.tree.TreeNode- Returns:
- the parent
TreeNodeof the receiver
-
getIndex
public int getIndex(javax.swing.tree.TreeNode a_node)
- Specified by:
getIndexin interfacejavax.swing.tree.TreeNode- Parameters:
a_node- the node to retrieve the index for- Returns:
- the index of
nodein the receivers children. If the receiver does not containnode, -1 will be returned
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfacejavax.swing.tree.TreeNode- Returns:
- true if the receiver allows children
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfacejavax.swing.tree.TreeNode- Returns:
- true if the receiver is a leaf
-
children
public java.util.Enumeration children()
- Specified by:
childrenin interfacejavax.swing.tree.TreeNode- Returns:
- the children of the receiver as an
Enumeration
-
-
DMelt 3.0 © DataMelt by jWork.ORG