org.vizzini.ai.geneticprogramming.terminal
Class DefaultTerminal
java.lang.Object
org.vizzini.util.tree.AbstractTreeNode
org.vizzini.ai.geneticprogramming.AbstractNode
org.vizzini.ai.geneticprogramming.terminal.AbstractTerminal
org.vizzini.ai.geneticprogramming.terminal.DefaultTerminal
- All Implemented Interfaces:
- Cloneable, INode, ITerminal, ITreeNode, IVisitable
public class DefaultTerminal
- extends AbstractTerminal
Provides a default implementation for a terminal in genetic programming.
- Since:
- v0.3
- Version:
- v0.3
- Author:
- Jeffrey M. Thompson
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 |
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 |
DefaultTerminal
public DefaultTerminal()
- Construct this object.
- Since:
- v0.3
DefaultTerminal
public DefaultTerminal(Object value)
- Construct this object with the given parameter.
- Parameters:
value
- Value.- Since:
- v0.3
DefaultTerminal
public DefaultTerminal(String name,
Object value)
- Construct this object with the given parameter.
- Parameters:
name
- Name.value
- Value.- Since:
- v0.3
evaluate
public Object evaluate(IContext context)
- Evaluate this function.
- Parameters:
context
- Context in which to evaluate.- Since:
- v0.3
getName
public String getName()
- Specified by:
getName
in interface INode
- Overrides:
getName
in class AbstractNode
- Returns:
- Return name.
- Since:
- v0.3
getReturnType
public Class getReturnType()
- Return the type of the return value.
- Since:
- v0.3
getValue
public Object getValue()
- Returns:
- Return value.
- Since:
- v0.3
setValue
public void setValue(Object value)
- Parameters:
value
- the value to set- Since:
- v0.3
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |