com.rubecula.darwin.domain.environment
Class Environment_Susceptible
java.lang.Object
net.sf.tostring0.AToString
com.rubecula.darwin.domain.environment.Environment_
com.rubecula.darwin.domain.environment.Environment_Susceptible
- All Implemented Interfaces:
- Susceptible, CacheSignature, Censusible, Environment, Countable, Visualizable, java.lang.Cloneable, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString
- Direct Known Subclasses:
- Environment_TS
public abstract class Environment_Susceptible
- extends Environment_
- implements Susceptible
Abstract class for an Environment
which is Susceptible
to
extended-phenotype-invoked changes.
- Author:
- Robin Hillyard
Fields inherited from interface net.sf.tostring0.IToString |
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE |
Method Summary |
protected abstract void |
logUpdate()
Method to log the fact that we caused an update |
boolean |
updateFromSource(Best<? extends ComparableValue> best,
java.lang.Object source)
This implementation attempts to update the given environment from the
given source. |
protected abstract boolean |
updateFromSource(java.lang.Object source)
|
Methods inherited from class com.rubecula.darwin.domain.environment.Environment_ |
addFactor, addListener, censusMe, clone, environmentChanged, equals, factorKeys, fireEnvironmentChanged, getCensusibleChildren, getCount, getEcoFactorValue, getEcoSystem, getFactor, getIdealPopulation, getIdentifier, getIndividuals, getListeners, getRealm, getSignature, getSink, hashCode, setEcoSystem, setIdealPopulation, setListeners, setSink, update |
Methods inherited from class net.sf.tostring0.AToString |
toString, toString, toStringBrief, toStringId |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.rubecula.darwin.domain.helper.Environment |
init |
Environment_Susceptible
public Environment_Susceptible(Realm realm)
- Parameters:
realm
-
Environment_Susceptible
public Environment_Susceptible(java.lang.String identifier,
Realm realm)
- Parameters:
identifier
- realm
-
Environment_Susceptible
public Environment_Susceptible(java.lang.String identifier,
Realm realm,
long idealPopulation)
- Parameters:
identifier
- realm
- idealPopulation
-
updateFromSource
public boolean updateFromSource(Best<? extends ComparableValue> best,
java.lang.Object source)
- Description copied from interface:
Susceptible
- This implementation attempts to update the given environment from the
given source. If an update occurs, we reset the bestForEnvironment value,
and log the new route and its corresponding travel time.
- Specified by:
updateFromSource
in interface Susceptible
- Parameters:
best
- the best object that should be reset if there is an update in
this method.source
- the source of the update
- Returns:
- true if the environment was updated
- See Also:
Susceptible.updateFromSource(com.rubecula.darwin.foundation.Best,
java.lang.Object)
logUpdate
protected abstract void logUpdate()
- Method to log the fact that we caused an update
updateFromSource
protected abstract boolean updateFromSource(java.lang.Object source)
- Parameters:
source
-
- Returns:
- true if this Environment was updated
Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.