|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.rubecula.util.StringMap_Abstract
com.rubecula.darwin.core.Environment_Abstract
public abstract class Environment_Abstract
Abstract class defining base methods which implement Environment interface.
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
The logger for this class. |
| Constructor Summary | |
|---|---|
protected |
Environment_Abstract()
Construct an empty unidentified environment (no eco factors). |
protected |
Environment_Abstract(String identifier)
Construct an empty identified environment (no eco factors). |
| Method Summary | |
|---|---|
void |
addListener(EnvironmentListener listener)
Mutating method to add a listener to changes in this Environment. |
protected void |
environmentChanged()
This method should be called whenever the environment has changed. |
double |
getDoubleValue(String name)
Method to retrieve the value of the eco factor defined by name. |
EcoFactor |
getFactor(String name)
Method to retrieve the eco factor defined by name. |
String |
getIdentifier()
Method to get the specific identifier for an object. |
Object |
put(EcoFactor factor)
Add an eco factor to this environment. |
| Methods inherited from class com.rubecula.util.StringMap_Abstract |
|---|
get, put |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rubecula.darwin.core.Environment |
|---|
keySet |
| Methods inherited from interface com.rubecula.util.StringMap |
|---|
get, put |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
protected Environment_Abstract()
protected Environment_Abstract(String identifier)
identifier - the identifier for this Environment (for logging).| Method Detail |
|---|
public void addListener(EnvironmentListener listener)
Environment
addListener in interface Environmentlistener - an object which is interested in changes to the environment.Collection.add(java.lang.Object)public double getDoubleValue(String name)
Environmentname.
getDoubleValue in interface Environmentname - the name (identifier, key) of the eco factor.
public EcoFactor getFactor(String name)
Environmentname.
getFactor in interface Environmentname - the name (identifier, key) of the eco factor.
public Object put(EcoFactor factor)
Environment
put in interface Environmentfactor - the eco factor, whose identifier
will be used as the key.
public String getIdentifier()
Identifiable
getIdentifier in interface Identifiableprotected void environmentChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||