|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Environment
Defines the concept of an Environment, modeled as a map of EcoFactor
objects. A Population of Organisms exist in an Environment,
whose properties (the EcoFactor objects) can vary over time.
| Field Summary | |
|---|---|
static long |
IDEAL_POPULATION_DEFAULT
100 |
static java.lang.String |
S_ID_UNIDENTIFIED
|
| Method Summary | |
|---|---|
java.lang.Object |
addFactor(EcoFactor factor)
Add an eco factor to this environment. |
boolean |
addListener(EnvironmentListener listener)
Mutating method to add a listener to changes in this Environment. |
java.util.Collection<java.lang.String> |
factorKeys()
|
void |
fireEnvironmentChanged()
Method to allow an external object to notify this Environment that it has changed, typically as the result of an external agent, for example a user action which has invoked update(String, Object). |
double |
getEcoFactorValue(java.lang.String name)
Method to retrieve the value of the eco factor defined by name. |
java.util.Collection<EcoFactor> |
getEcoSystem()
|
EcoFactor |
getFactor(java.lang.String name)
Method to retrieve the eco factor defined by name. |
long |
getIdealPopulation()
|
java.util.Collection<EnvironmentListener> |
getListeners()
|
void |
init()
Initialize this environment programatically (normally, initialization is done in the configuration). |
void |
setEcoSystem(java.util.Collection<EcoFactor> ecoFactors)
Set the ecoFactors for this environment to the collection provided. |
void |
setIdealPopulation(long idealPopulation)
|
void |
setListeners(java.util.Collection<EnvironmentListener> listeners)
Reset the set of environment listeners according to the collection provided. |
boolean |
update(java.lang.String factorKey,
java.lang.Object factorValue)
Find and set the eco factor to have the factor value, then, if successful, invoke fireEnvironmentChanged(). |
| Methods inherited from interface com.rubecula.darwin.foundation.Visualizable |
|---|
getIndividuals, getRealm, getSink |
| Methods inherited from interface net.sf.tostring0.Identifiable |
|---|
getIdentifier |
| Methods inherited from interface com.rubecula.darwin.foundation.Countable |
|---|
getCount |
| Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible |
|---|
censusMe, getCensusibleChildren |
| Methods inherited from interface com.rubecula.darwin.domain.helper.CacheSignature |
|---|
getSignature |
| Field Detail |
|---|
static final long IDEAL_POPULATION_DEFAULT
static final java.lang.String S_ID_UNIDENTIFIED
| Method Detail |
|---|
java.lang.Object addFactor(EcoFactor factor)
setEcoSystem(Collection).
factor - the eco factor, whose identifier will be used as the key.
boolean addListener(EnvironmentListener listener)
listener - the listener.
java.util.Collection<java.lang.String> factorKeys()
void fireEnvironmentChanged()
update(String, Object).
double getEcoFactorValue(java.lang.String name)
name.
name - the name (identifier, key) of the eco factor.
java.util.Collection<EcoFactor> getEcoSystem()
EcoFactor getFactor(java.lang.String name)
name.
name - the name (identifier, key) of the eco factor.
long getIdealPopulation()
java.util.Collection<EnvironmentListener> getListeners()
void init()
void setEcoSystem(java.util.Collection<EcoFactor> ecoFactors)
ecoFactors - void setIdealPopulation(long idealPopulation)
idealPopulation - void setListeners(java.util.Collection<EnvironmentListener> listeners)
listeners - Getter/Setter typically called by reflection.
boolean update(java.lang.String factorKey,
java.lang.Object factorValue)
fireEnvironmentChanged().
factorKey - factorValue -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||