org.vizzini.ai.geneticprogramming
Class AbstractNode

java.lang.Object
  extended by org.vizzini.util.tree.AbstractTreeNode
      extended by org.vizzini.ai.geneticprogramming.AbstractNode
All Implemented Interfaces:
Cloneable, INode, ITreeNode, IVisitable
Direct Known Subclasses:
AbstractFunction, AbstractTerminal

public abstract class AbstractNode
extends AbstractTreeNode
implements INode

Provides base functionality for a node in genetic programming.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
AbstractNode()
          Construct this object.
AbstractNode(String name)
          Construct this object with the given parameter.
 
Method Summary
 INode createNewInstance()
          Create a new instance, using this as an exemplar.
protected  String dotLabel()
          Return a dot label of this node.
protected  String dotLinkDesc()
          Return a dot description of this node.
 boolean equals(Object object)
          Return true if the given object is equal to this.
 String getName()
           
 int hashCode()
          Returns a hash code value for the object.
 void setName(String name)
           
 
Methods inherited from class org.vizzini.util.tree.AbstractTreeNode
acceptBreadthFirst, acceptDepthFirst, add, breadthFirstIterator, children, clone, createTreeNodeCollection, depthFirstIterator, dotDesc, fillCollectionBreadthFirst, fillCollectionChildren, fillCollectionDepthFirst, getBreadthFirstList, getChildAt, getChildCount, getChildren, getDepth, getDepthFirstList, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLevel, getNextSibling, getNodeCount, getParent, getPath, getRoot, getTreeNodeCollectionClass, getUserObject, insert, isChildAllowed, isLeaf, isRoot, remove, remove, removeAllChildren, removeFromParent, setChildAllowed, setChildren, setParent, setTreeNodeCollectionClass, setUserObject, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.vizzini.ai.geneticprogramming.INode
evaluate, getReturnType
 
Methods inherited from interface org.vizzini.util.tree.ITreeNode
add, breadthFirstIterator, children, clone, depthFirstIterator, getBreadthFirstList, getChildAt, getChildCount, getDepth, getDepthFirstList, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLevel, getNextSibling, getNodeCount, getParent, getPath, getRoot, getUserObject, insert, isChildAllowed, isLeaf, isRoot, remove, remove, removeAllChildren, removeFromParent, setChildAllowed, setParent, setUserObject, toString
 
Methods inherited from interface org.vizzini.util.tree.IVisitable
acceptBreadthFirst, acceptDepthFirst
 

Constructor Detail

AbstractNode

public AbstractNode()
Construct this object.

Since:
v0.3

AbstractNode

public AbstractNode(String name)
Construct this object with the given parameter.

Parameters:
name - Name.
Since:
v0.3
Method Detail

createNewInstance

public INode createNewInstance()
Create a new instance, using this as an exemplar.

Specified by:
createNewInstance in interface INode
Since:
v0.3

equals

public boolean equals(Object object)
Return true if the given object is equal to this.

Overrides:
equals in class AbstractTreeNode
Parameters:
object - The object to compare.
Since:
v0.3

getName

public String getName()
Specified by:
getName in interface INode
Returns:
Return name.
Since:
v0.3

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class AbstractTreeNode
Since:
v0.3

setName

public void setName(String name)
Specified by:
setName in interface INode
Parameters:
name - the name to set
Since:
v0.3

dotLabel

protected String dotLabel()
Return a dot label of this node.

Overrides:
dotLabel in class AbstractTreeNode
Since:
v0.3

dotLinkDesc

protected String dotLinkDesc()
Return a dot description of this node.

Overrides:
dotLinkDesc in class AbstractTreeNode
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02