org.artoflife.gp.genome
Class VariableGene
java.lang.Object
|
+--org.artoflife.gp.genome.GpTreeNode
|
+--org.artoflife.gp.genome.VariableGene
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public final class VariableGene
- extends GpTreeNode
Represents the value of a field from the Phenotype,
retrieved as a JavaBeans property.
- Author:
- Steve Meyfroidt
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VariableGene
public VariableGene()
VariableGene
public VariableGene(java.lang.String fieldName,
java.lang.Class fieldClass)
getReturnClass
public java.lang.Class getReturnClass()
- Specified by:
getReturnClass
in class GpTreeNode
- Returns:
- the class this gene returns on evaluation
evaluate
public java.lang.Object evaluate(Phenotype phenotype)
- Description copied from class:
GpTreeNode
- Evaluate this expression in the context of
the passed
Phenotype
.
- Specified by:
evaluate
in class GpTreeNode
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getParameterClasses
protected java.util.List getParameterClasses()
- Specified by:
getParameterClasses
in class GpTreeNode
- Returns:
- List of the Classes that this gene
expects to evaluate against
- See Also:
GpTreeNode.getParameterClasses()
getParameterGene
public GpTreeNode getParameterGene(int index)
- Specified by:
getParameterGene
in class GpTreeNode
- Returns:
- the gene at the passed index, may be null
- See Also:
GpTreeNode.getParameterGene(int)
setParameterGene
public void setParameterGene(int index,
GpTreeNode gene)
- Specified by:
setParameterGene
in class GpTreeNode
- Parameters:
index
- the index of the gene to replacegene
- the gene to replace with- See Also:
GpTreeNode.setParameterGene(int, GpTreeNode)
Copyright © 2002 the Art Of Life team. All Rights Reserved.