|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rubecula.darwin.core.Factory_Abstract
public abstract class Factory_Abstract
Abstract Factory.
| Field Summary | |
|---|---|
static String |
P_ALLELE0
allele0 |
static String |
P_ALLELE1
allele1 |
static String |
P_SEX
sex |
| Constructor Summary | |
|---|---|
protected |
Factory_Abstract()
|
| Method Summary | |
|---|---|
Allele |
makeAllele(Object value)
Factory method to instantiate a new Allele of the appropriate class, with an auto-generated key. |
Allele |
makeAllele(Object key,
Object value)
Factory method to instantiate a new Allele of the appropriate class. |
static Map<String,Object> |
makeDiploidAlleleMap(Allele x,
Allele y)
Class convenience method to create a map suitable for calling makeGene(). |
Gene |
makeGene(int ode)
Factory method to instantiate a new Gene of the appropriate class. |
Genotype |
makeGenotype(int ode)
Factory method to instantiate a new genotype of the appropriate class. |
static Map<String,Object> |
makeHaploidAlleleMap(Allele x)
Class convenience method to create a map suitable for calling makeGene(). |
Organism |
makeOrganism(Population population,
Genotype genotype)
Factory method to instantiate a new organism of the appropriate class, with a population-specific auto-generated identifier. |
Organism |
makeOrganism(Population population,
Genotype genotype,
Map<String,Object> properties)
Factory method to instantiate a new organism of the appropriate class, with a population-specific auto-generated identifier. |
Organism |
makeOrganism(String identifier,
Population population,
Genotype genotype)
Factory method to instantiate a new organism of the appropriate class. |
Phenotype |
makePhenotype()
Factory method to instantiate a new phenotype of the appropriate class. |
static Map<String,Object> |
makeSexMap(boolean female)
Class convenience method to create a map suitable for calling makeOrganism(). |
Trait |
makeTrait(String identifier)
Factory method to instantiate a new Trait of the appropriate class, without an initial value. |
Trait |
makeTrait(String identifier,
Map<String,Object> properties)
Factory method to instantiate a new Trait of the appropriate class, without an initial value. |
Trait |
makeTrait(String identifier,
Object value)
Factory method to instantiate a new Trait of the appropriate class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.rubecula.darwin.core.Factory |
|---|
makeAllele, makeAllele, makeGene, makeGenotype, makeOrganism, makePhenotype, makeTrait |
| Field Detail |
|---|
public static final String P_ALLELE1
public static final String P_ALLELE0
public static final String P_SEX
| Constructor Detail |
|---|
protected Factory_Abstract()
| Method Detail |
|---|
public static Map<String,Object> makeDiploidAlleleMap(Allele x,
Allele y)
x - allele for position P_ALLELE0y - allele for position P_ALLELE1
Map objectspublic static Map<String,Object> makeHaploidAlleleMap(Allele x)
x - an allele for position P_ALLELE0
Map objectspublic static Map<String,Object> makeSexMap(boolean female)
female - a boolean for the sex (true for female).
Map objects with one element
with the key P_SEX and the value (as a Boolean) female.public Allele makeAllele(Object value)
Factory
makeAllele in interface Factoryvalue - the value of the new allele.
public Allele makeAllele(Object key,
Object value)
Factory
makeAllele in interface Factorykey - the key of the new allele.value - the value of the new allele.
public Gene makeGene(int ode)
Factory
makeGene in interface Factoryode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).
public Genotype makeGenotype(int ode)
Factory
makeGenotype in interface Factoryode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).
public Organism makeOrganism(Population population,
Genotype genotype)
Factorypopulation-specific auto-generated identifier.
makeOrganism in interface Factorypopulation - the population into which the new organism will be "born".genotype - the genotype which defines the new organism.
public Organism makeOrganism(Population population,
Genotype genotype,
Map<String,Object> properties)
Factorypopulation-specific auto-generated identifier.
makeOrganism in interface Factorypopulation - the population into which the new organism will be "born".genotype - the genotype which defines the new organism.properties - a map which specifies any additional properties required at instantation time.
public Organism makeOrganism(String identifier,
Population population,
Genotype genotype)
Factory
makeOrganism in interface Factoryidentifier - the identifier for the new organism.population - the population into which the new organism will be "born".genotype - the genotype which defines the new organism.
public Phenotype makePhenotype()
Factory
makePhenotype in interface Factorypublic Trait makeTrait(String identifier)
Factory
makeTrait in interface Factoryidentifier - the identifier of the new trait.
public Trait makeTrait(String identifier,
Map<String,Object> properties)
Factory
makeTrait in interface Factoryidentifier - the identifier of the new trait.properties - a map which specifies any additional properties required at instantation time.
public Trait makeTrait(String identifier,
Object value)
Factory
makeTrait in interface Factoryidentifier - the identifier of the new trait.value - the initial value of the new trait.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||