|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rubecula.darwin.core.Factory_Abstract
com.rubecula.darwin.core.Factory_Default
public class Factory_Default
Default implementation of Factory.
For the convenience of applications, this class can be extended.
TODO Consider making this class final (because it's a Default class).
However, currently it has extenders.
| Field Summary | |
|---|---|
protected static String |
CLASS
|
protected static String |
NEED_PROPS
|
protected static String |
NO_PROPS
|
| Fields inherited from class com.rubecula.darwin.core.Factory_Abstract |
|---|
P_ALLELE0, P_ALLELE1, P_SEX |
| Constructor Summary | |
|---|---|
Factory_Default()
|
|
| Method Summary | |
|---|---|
Allele |
makeAllele(Object value,
Map<String,Object> properties)
Factory method to instantiate a new Allele of the appropriate class, with an auto-generated key. |
Allele |
makeAllele(Object key,
Object value,
Map<String,Object> properties)
Factory method to instantiate a new Allele of the appropriate class. |
Gene |
makeGene(int ode,
Map<String,Object> properties)
Factory method to instantiate a new Gene of the appropriate class. |
Genotype |
makeGenotype(int ode,
Map<String,Object> properties)
Factory method to instantiate a new genotype of the appropriate class. |
Organism |
makeOrganism(String identifier,
Population population,
Genotype genotype,
Map<String,Object> properties)
Factory method to instantiate a new organism of the appropriate class. |
Phenotype |
makePhenotype(Map<String,Object> properties)
Factory method to instantiate a new phenotype of the appropriate class. |
Trait |
makeTrait(String identifier,
Object value,
Map<String,Object> properties)
Factory method to instantiate a new Trait of the appropriate class. |
| Methods inherited from class com.rubecula.darwin.core.Factory_Abstract |
|---|
makeAllele, makeAllele, makeDiploidAlleleMap, makeGene, makeGenotype, makeHaploidAlleleMap, makeOrganism, makeOrganism, makeOrganism, makePhenotype, makeSexMap, makeTrait, makeTrait, makeTrait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String NO_PROPS
protected static final String NEED_PROPS
protected static final String CLASS
| Constructor Detail |
|---|
public Factory_Default()
| Method Detail |
|---|
public Allele makeAllele(Object value,
Map<String,Object> properties)
Factory
value - the value of the new allele.properties - a map which specifies any additional properties required at instantation time.
public Allele makeAllele(Object key,
Object value,
Map<String,Object> properties)
Factory
key - the key of the new allele.value - the value of the new allele.properties - a map which specifies any additional properties required at instantation time.
public Gene makeGene(int ode,
Map<String,Object> properties)
Factory
ode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).properties - a map which specifies any additional properties required at instantation time.
public Genotype makeGenotype(int ode,
Map<String,Object> properties)
Factory
ode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).properties - a map which specifies any additional properties required at instantation time.
public Organism makeOrganism(String identifier,
Population population,
Genotype genotype,
Map<String,Object> properties)
Factory
identifier - 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.properties - a map which specifies any additional properties required at instantation time.
public Phenotype makePhenotype(Map<String,Object> properties)
Factory
properties - a map which specifies any additional properties required at instantation time.
public Trait makeTrait(String identifier,
Object value,
Map<String,Object> properties)
Factory
identifier - the identifier of the new trait.value - the initial value of the new trait.properties - a map which specifies any additional properties required at instantation time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||