com.rubecula.darwin.core
Interface Factory

All Known Implementing Classes:
Factory_Abstract, Factory_Default, Factory_PepperedMoth, Factory_TS

public interface Factory

Defines the methods which will instantiate new objects for an evolutionary computation system.

Author:
Robin

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 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)
          Factory method to instantiate a new Allele of the appropriate class.
 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)
          Factory method to instantiate a new Gene 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)
          Factory method to instantiate a new genotype 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(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.
 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()
          Factory method to instantiate a new phenotype 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)
          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.
 Trait makeTrait(String identifier, Object value, Map<String,Object> properties)
          Factory method to instantiate a new Trait of the appropriate class.
 

Method Detail

makeAllele

Allele makeAllele(Object value)
Factory method to instantiate a new Allele of the appropriate class, with an auto-generated key.

Parameters:
value - the value of the new allele.
Returns:
a newly constructed instance of Allele.

makeAllele

Allele makeAllele(Object value,
                  Map<String,Object> properties)
Factory method to instantiate a new Allele of the appropriate class, with an auto-generated key.

Parameters:
value - the value of the new allele.
properties - a map which specifies any additional properties required at instantation time.
Returns:
a newly constructed instance of Allele.

makeAllele

Allele makeAllele(Object key,
                  Object value)
Factory method to instantiate a new Allele of the appropriate class.

Parameters:
key - the key of the new allele.
value - the value of the new allele.
Returns:
a newly constructed instance of Allele.

makeAllele

Allele makeAllele(Object key,
                  Object value,
                  Map<String,Object> properties)
Factory method to instantiate a new Allele of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Allele.

makeGene

Gene makeGene(int ode)
Factory method to instantiate a new Gene of the appropriate class.

Parameters:
ode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).
Returns:
a newly constructed instance of Gene.

makeGene

Gene makeGene(int ode,
              Map<String,Object> properties)
Factory method to instantiate a new Gene of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Gene.

makeGenotype

Genotype makeGenotype(int ode)
Factory method to instantiate a new genotype of the appropriate class.

Parameters:
ode - the number of alleles to be found at a particular locus (1 if haploid, 2 if diploid).
Returns:
a newly constructed instance of Genotype.

makeGenotype

Genotype makeGenotype(int ode,
                      Map<String,Object> properties)
Factory method to instantiate a new genotype of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Genotype.

makeOrganism

Organism makeOrganism(Population population,
                      Genotype genotype)
Factory method to instantiate a new organism of the appropriate class, with a population-specific auto-generated identifier.

Parameters:
population - the population into which the new organism will be "born".
genotype - the genotype which defines the new organism.
Returns:
a newly constructed instance of Organism.

makeOrganism

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.

Parameters:
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.
Returns:
a newly constructed instance of Organism.

makeOrganism

Organism makeOrganism(String identifier,
                      Population population,
                      Genotype genotype)
Factory method to instantiate a new organism of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Organism.

makeOrganism

Organism makeOrganism(String identifier,
                      Population population,
                      Genotype genotype,
                      Map<String,Object> properties)
Factory method to instantiate a new organism of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Organism.

makePhenotype

Phenotype makePhenotype()
Factory method to instantiate a new phenotype of the appropriate class.

Returns:
a newly constructed instance of Phenotype.

makePhenotype

Phenotype makePhenotype(Map<String,Object> properties)
Factory method to instantiate a new phenotype of the appropriate class.

Parameters:
properties - a map which specifies any additional properties required at instantation time.
Returns:
a newly constructed instance of Phenotype.

makeTrait

Trait makeTrait(String identifier)
Factory method to instantiate a new Trait of the appropriate class, without an initial value.

Parameters:
identifier - the identifier of the new trait.
Returns:
a newly constructed instance of Trait.

makeTrait

Trait makeTrait(String identifier,
                Map<String,Object> properties)
Factory method to instantiate a new Trait of the appropriate class, without an initial value.

Parameters:
identifier - the identifier of the new trait.
properties - a map which specifies any additional properties required at instantation time.
Returns:
a newly constructed instance of Trait.

makeTrait

Trait makeTrait(String identifier,
                Object value)
Factory method to instantiate a new Trait of the appropriate class.

Parameters:
identifier - the identifier of the new trait.
value - the initial value of the new trait.
Returns:
a newly constructed instance of Trait.

makeTrait

Trait makeTrait(String identifier,
                Object value,
                Map<String,Object> properties)
Factory method to instantiate a new Trait of the appropriate class.

Parameters:
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.
Returns:
a newly constructed instance of Trait.