com.rubecula.darwin.domain.world
Class OrganismFactory
java.lang.Object
com.rubecula.darwin.domain.world.OrganismFactory
public final class OrganismFactory
- extends java.lang.Object
Factory Class to create Organism objects.
Applications can't change this class (it is final) but they can override the
methods which call these methods.
- Author:
- Robin Hillyard
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
makeOrganism
public static Organism makeOrganism(java.lang.Class<? extends Organism> clazz,
Nuclear nuclear,
Population population,
java.lang.String identifier)
- Parameters:
clazz - the class of Organism to instantiate, which must have a
constructor of form Organism(Nuclear,Population,String).nuclear - the genetic information for the new organismpopulation - the population to which the new organism will belongidentifier - an identifier for the new organism
- Returns:
- a newly constructed
Organism.
TEST
makeOrganism
public static Organism makeOrganism(Nuclear nuclear,
Colony colony,
java.lang.String identifier)
- Factory method for a new Organism.
- Parameters:
nuclear - the genetic information for the new organismcolony - the population to which the new organism will belongidentifier - an identifier for the new organism
- Returns:
- either an
Organism_Sexual or an Organism_Asexual,
depending on whether nuclear is a Nuclear_Zygote or not.
Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.