com.rubecula.darwin.core
Class Mutator_Abstract

java.lang.Object
  extended by com.rubecula.darwin.core.Mutator_Abstract
All Implemented Interfaces:
Mutator
Direct Known Subclasses:
Mutator_Null, Mutator_PepperedMoth, Mutator_TS

public abstract class Mutator_Abstract
extends Object
implements Mutator

Abstract class to define the base methods and fields for instances of Mutator interface.

Author:
Robin

Field Summary
protected static org.apache.commons.logging.Log log
          The logger for this class.
 
Constructor Summary
protected Mutator_Abstract()
          Protected constructor.
 
Method Summary
 Allele mutate(Allele allele)
          By default, the allele is returned unchanged.
 Genotype mutate(Genotype genotype)
          By default, the genotype is returned unchanged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
The logger for this class.

Constructor Detail

Mutator_Abstract

protected Mutator_Abstract()
Protected constructor.

Method Detail

mutate

public Allele mutate(Allele allele)
By default, the allele is returned unchanged.

Specified by:
mutate in interface Mutator
Parameters:
allele - the original allele
Returns:
either the original allele or a mutated version of it. TODO it seems to me now that this mutation should operate on a Gene, not on an Allele, but there again we have to remember that the word "gene" is used in two different ways in common parlance.
See Also:
Mutator.mutate(com.rubecula.darwin.core.Allele)

mutate

public Genotype mutate(Genotype genotype)
By default, the genotype is returned unchanged.

Specified by:
mutate in interface Mutator
Parameters:
genotype - the original genotype
Returns:
either the original genotype or a mutated version of it.
See Also:
Mutator.mutate(com.rubecula.darwin.core.Genotype)