|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rubecula.darwin.domain.genetics.GeneFactory
public final class GeneFactory
Factory Class to create Gene objects. Applications can't change this class (it is final) but they can override the methods which call these methods.
Method Summary | |
---|---|
static Gene |
makeDiploid(Locus locus,
java.lang.String allele1,
java.lang.String allele2)
Construct a new Gene_Diploid with the given allele indexes |
static Gene |
makeGene(java.lang.Class<? extends Gene> clazz,
Locus locus,
java.lang.Object... parameters)
TEST |
static Gene |
makeHaploid(Locus locus,
java.lang.String allele)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Gene makeDiploid(Locus locus, java.lang.String allele1, java.lang.String allele2)
Gene_Diploid
with the given allele indexes
locus
- the locus for the new geneallele1
- the key for the 1st alleleallele2
- the key for the 2nd allele
public static Gene makeGene(java.lang.Class<? extends Gene> clazz, Locus locus, java.lang.Object... parameters)
clazz
- the class of Gene to instantiate, which must have a
constructor of form Gene(Locus,Object[]).locus
- the locus to which the new gene will belong.parameters
- the parameters to pass to the constructor.
Gene
.public static Gene makeHaploid(Locus locus, java.lang.String allele)
locus
- the locus for the new geneallele
- the key to the allele
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |