com.rubecula.darwin.domain.world
Class Genomic_Sexual

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.genetics.Genomic_
          extended by com.rubecula.darwin.domain.genetics.Genomic_Diploid
              extended by com.rubecula.darwin.domain.world.Genomic_Sexual
All Implemented Interfaces:
HasSexChromosome, Genomic, Ploidy, Replicator, Countable, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString

public final class Genomic_Sexual
extends Genomic_Diploid
implements HasSexChromosome

Lifespan: permanent. Concrete implementation of Genomic representing the possible genetic information contained in a Taxon. A Genomic_Sexual extends Genomic_ comes with exactly one default chromosome which is sex-linked and no non-sex-linked chromosomes.

XXX consider renaming this.

Version:
$Revision: 1.9 $
Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.domain.genetics.Genomic_
_chromosomes, expresserCommon, expressers, LOG
 
Fields inherited from interface com.rubecula.darwin.domain.helper.Ploidy
DIPLOID, HAPLOID
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
Genomic_Sexual(java.lang.String identifier, Meiosis meiosis, Mutator mutator, org.apache.commons.math.random.RandomGenerator random)
          Constructor for a new Genomic_Sexual instance using the given meiosis implementation and the given mutator implementation.
Genomic_Sexual(java.lang.String identifier, Meiosis meiosis, org.apache.commons.math.random.RandomGenerator random)
          Constructor for a new Genomic_Sexual instance using the given meiosis implementation.
 
Method Summary
protected  void clearChromosomes()
          Retain only the sex chromosome
 Chromosome getChromosome(int index)
          Use this method to return a non-sex chromosome from this Genomic_Sexual object.
 Chromosome_Sex getChromosomeSex()
           
 Locus getLocusSex()
          XXX consider reducing scope for this.
 void setExpressers(java.util.Map<Locus,Expresser> expressers)
          Reset the expresser map, but include the sex chromosome expresser.
 
Methods inherited from class com.rubecula.darwin.domain.genetics.Genomic_
addChromosome, addChromosome, createGamete, equals, express, express, getAlphabet, getChromosomes, getCount, getExpresser, getExpressers, getIdentifier, getLocus, getLocusCount, getMeiosis, getMutator, getPloidy, hashCode, mutate, normalize, putExpresser, setChromosomes, setExpresser, simplify
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Genomic_Sexual

public Genomic_Sexual(java.lang.String identifier,
                      Meiosis meiosis,
                      Mutator mutator,
                      org.apache.commons.math.random.RandomGenerator random)
Constructor for a new Genomic_Sexual instance using the given meiosis implementation and the given mutator implementation.

Parameters:
identifier -
meiosis -
mutator -
random - an implementer of RandomGenerator.

Genomic_Sexual

public Genomic_Sexual(java.lang.String identifier,
                      Meiosis meiosis,
                      org.apache.commons.math.random.RandomGenerator random)
Constructor for a new Genomic_Sexual instance using the given meiosis implementation. XXX this appears to be called only by unit tests

Parameters:
identifier - the identifier for this Genomic.
meiosis - an implementer of Meiosis.
random - an implementer of RandomGenerator.
Method Detail

getChromosome

public Chromosome getChromosome(int index)
Use this method to return a non-sex chromosome from this Genomic_Sexual object. Beware: this method is inconsistent with Genomic_.getChromosomes(), which includes all chromosomes.

Specified by:
getChromosome in interface Genomic
Overrides:
getChromosome in class Genomic_
Returns:
the (index+1)th chromosome from this Genomic.
See Also:
Genomic_.getChromosome(int)

getChromosomeSex

public Chromosome_Sex getChromosomeSex()
Specified by:
getChromosomeSex in interface HasSexChromosome
Returns:
the 0th chromosome.
See Also:
HasSexChromosome.getChromosomeSex()

getLocusSex

public Locus getLocusSex()
XXX consider reducing scope for this.

Returns:
the sex locus (which belongs to the sex chromosome).

setExpressers

public void setExpressers(java.util.Map<Locus,Expresser> expressers)
Reset the expresser map, but include the sex chromosome expresser.

Overrides:
setExpressers in class Genomic_
See Also:
Genomic_.setExpressers(java.util.Map)

clearChromosomes

protected void clearChromosomes()
Retain only the sex chromosome

Overrides:
clearChromosomes in class Genomic_
See Also:
Genomic_.clearChromosomes()


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