stella
Interface WeatherDependingParameter

All Superinterfaces:
Initializable, Parameter, PropertySupplying
All Known Implementing Classes:
AcceleratedTime, HumiditySwitch, SensorValue, SettableTime, WeatherRemainsBad, WeatherTrigger

public interface WeatherDependingParameter
extends Parameter

A weather depending parameter can define its value only after a WeatherSurveying instance has been registered to it. To follow the same approach as in the TargetDependingParameter interface, two possiblities of data retrieval are possible: Either providing the weather surveyor directly on the #getFor method, or registering it with registerWeather(stella.sensor.WeatherSurveying) and subsequentially calling Parameter.get().
Due to the dependency on weather, setting the parameter with the Parameter.set(java.lang.Object) method seems unlikely. Parameter values change with the sensors of the weather station.


Field Summary
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Method Summary
 Object getForWeather(WeatherSurveying weather)
          Returns the parameter value using some sensors of the weather surveying handed over.
 void registerWeather(WeatherSurveying sensors)
          Registers a weather surveyor permanently to this parameter.
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Method Detail

getForWeather

Object getForWeather(WeatherSurveying weather)
Returns the parameter value using some sensors of the weather surveying handed over. Subsequent calls to Parameter.get() link to identical sensors.


registerWeather

void registerWeather(WeatherSurveying sensors)
Registers a weather surveyor permanently to this parameter. All subsequent calls to the parameter's Parameter.get() method will refer to this weather station.