com.rubecula.darwin.domain.environment
Class Expresser_Direct

java.lang.Object
  extended by com.rubecula.darwin.domain.environment.Expresser_
      extended by com.rubecula.darwin.domain.environment.Expresser_Direct
All Implemented Interfaces:
Expresser

public final class Expresser_Direct
extends Expresser_

This expresser is suitable for haploid genomes. There is a simple one-to-one correspondence between alleles and traits (not dominance, recession, etc.). If you are looking for an expresser for the situation where there is but one allele, with differing values, then consider using the Expresser_Function class.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.domain.environment.Expresser_
_character, LOG
 
Constructor Summary
Expresser_Direct(Pharacter character, java.util.Map<java.lang.String,java.lang.String> mapping)
           
 
Method Summary
 Trait express(Gene... genes)
          Express a gene by getting the allele's value and generating a new trait with value derived from the allele's value.
 
Methods inherited from class com.rubecula.darwin.domain.environment.Expresser_
createTrait, createTrait, createTrait, createTrait, equals, express, getCharacter, getComplement, hashCode, isComplementary
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expresser_Direct

public Expresser_Direct(Pharacter character,
                        java.util.Map<java.lang.String,java.lang.String> mapping)
Parameters:
character -
mapping - a map of allele keys to variant keys
Method Detail

express

public Trait express(Gene... genes)
Express a gene by getting the allele's value and generating a new trait with value derived from the allele's value.

Parameters:
genes - a variable number of Gene objects.
Returns:
a trait which is the expression of the given genes
See Also:
Expresser.express(Colony, com.rubecula.darwin.domain.helper.Gene[])


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.