|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tostring0.AToString com.rubecula.darwin.domain.genetics.Mutator_
public abstract class Mutator_
Abstract class to define the base methods and fields for instances of
Mutator
interface.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
The logger for this class. |
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 | |
---|---|
protected |
Mutator_()
Protected constructor for a mutating Mutator. |
protected |
Mutator_(boolean identity)
Protected constructor. |
Method Summary | |
---|---|
protected static void |
addToLocusIfUnknown(Allele allele)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getIdentifier()
Return the class's simple name (since these are normally singleton instances we don't really need to distinguish them). |
int |
hashCode()
|
protected boolean |
isComplementary(Gene prior,
Gene gene)
Method to test whether two genes are complimentary. |
boolean |
isIdentity()
XXX |
Allele |
mutate(Allele allele)
By default, the allele is returned unchanged. |
Genome |
mutate(Genome genome)
By default, the copy of the genome is returned, such that the individual genes have been processed using the mutate(Allele) method. |
void |
normalize(Genome genome,
Genome reference)
Normalize the given genome with respect to the reference genome. |
boolean |
simplify(Genome genome)
Do nothing. |
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 |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
protected Mutator_()
protected Mutator_(boolean identity)
identity
- true only if the new Mutator does not change anythingMethod Detail |
---|
protected static void addToLocusIfUnknown(Allele allele)
allele
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getIdentifier()
getIdentifier
in interface net.sf.tostring0.Identifiable
Identifiable.getIdentifier()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isIdentity()
isIdentity
in interface Mutator
Mutator.isIdentity()
public Allele mutate(Allele allele)
mutate
in interface Mutator
allele
- the original allele
Mutator.mutate(com.rubecula.darwin.domain.helper.Allele)
public Genome mutate(Genome genome)
mutate(Allele)
method. To be
precise, the result is the result of invoking
Genome.mutate(Mutator)
.
This implementation of the method never returns a reference to the
genome, it is always a copy (although result.equals(genome)
may still be true).
mutate
in interface Mutator
genome
- the original genome
Mutator.mutate(com.rubecula.darwin.domain.helper.Genome)
public void normalize(Genome genome, Genome reference)
Mutator
normalize
in interface Mutator
Mutator.normalize(com.rubecula.darwin.domain.helper.Genome,
com.rubecula.darwin.domain.helper.Genome)
public boolean simplify(Genome genome)
simplify
in interface Mutator
genome
- TODO consider narrowing to Genotype
Mutator.simplify(com.rubecula.darwin.domain.helper.Genome)
protected boolean isComplementary(Gene prior, Gene gene)
prior
- gene
-
DarwinException
- if the loci are different
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |