com.rubecula.darwin.core
Class Expression_Default

java.lang.Object
  extended by com.rubecula.darwin.core.Expression_Abstract
      extended by com.rubecula.darwin.core.Expression_Default
All Implemented Interfaces:
Expression

public final class Expression_Default
extends Expression_Abstract

Default implementation of Expression.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.core.Expression_Abstract
log
 
Constructor Summary
Expression_Default()
          Public constructor.
 
Method Summary
 Trait express(Gene gene, Factory factory)
          This is a very simplistic expression method which relies on the values of the traits being from the same domain as the values of the alleles!
 String toString()
           
 
Methods inherited from class com.rubecula.darwin.core.Expression_Abstract
express
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expression_Default

public Expression_Default()
Public constructor.

Method Detail

express

public Trait express(Gene gene,
                     Factory factory)
This is a very simplistic expression method which relies on the values of the traits being from the same domain as the values of the alleles!

Parameters:
gene - the (diploid) gene to be expressed
factory - the implementer of Factory.
Returns:
an instance of Trait_Default whose value is the same as the value for the allele which is first in dictionary order (very arbitrary).
Throws:
DarwinException - if the Gene is not diploid.
See Also:
Expression.express(Gene, Factory)

toString

public String toString()
Overrides:
toString in class Object
Returns:
 
 
See Also:
Attribute_Abstract.toString()