|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractTrigger
stella.parameter.SimpleTrigger
stella.parameter.SeasonWeather
public class SeasonWeather
A trigger that mimics seasonal weather on the STELLA site. Whenever queried, it defines the current weather by matching the current time to a yes/no answer for good weather. It should use pre-recorded weather data from past year(s) to provide a seasonal match. Additionally, for a not-so coarse time-resolution, the solar-height parameter should be used.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private Time |
current
The time parameter. |
private static double |
DEFHOLDTIME
The default hold-time for bad-weather events in ms. |
static String |
DEFNAME
The default name of this parameter. |
private static String |
DEFSEASON
The default mapping of month-numbers to bad weather probabilities. |
private static String |
DEFSOLHEIGHT
The default solz-parameter. |
private static String |
DEFTIME
The default time parameter. |
private static double |
DEFTWILIGHT
The default toggle value for the solar height. |
private static Calendar |
GREGORIAN
We always use a gregorian calendar. |
static String |
KEY_HOLDTIME
The hold-time of bad-weather |
static String |
KEY_SEASON
The month-to-bad-weather probabilities as a look-up table. |
static String |
KEY_SOLHEIGHT
The key mapping to the solz-paramter. |
static String |
KEY_TIME
The key mapping to the time paramter. |
static String |
KEY_TWILIGHT
The trigger value for the solz-parameter. |
private double |
lasttime
The value of the time parameter when last queried. |
private SolHeight |
solz
The solar height. |
private Map |
weather
The mapping of month numbers to probabilities. |
| Fields inherited from class stella.parameter.SimpleTrigger |
|---|
KEY_INITBOOLEAN |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
SeasonWeather(Map prop)
Contructs a new season weather. |
|
| Method Summary | |
|---|---|
Boolean |
getTrigger()
Returns the extrapolated weather as a boolean. |
void |
registerParameter(Parameter what)
Registers additional parameters. |
double |
rescanned(String key,
String old,
String newval)
As any parameter depending instance we fail if the parameter we depend on is now a different one. |
| Methods inherited from class stella.parameter.SimpleTrigger |
|---|
getLastToggleTime, init, setTrigger |
| Methods inherited from class stella.parameter.AbstractTrigger |
|---|
get, getElapsedToggleTime, isTrue, set, toggleTrigger |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.Reloadable |
|---|
reload |
| Methods inherited from interface stella.Parameter |
|---|
getFormatted, getName, getString |
| 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.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_TIME
public static final String KEY_SOLHEIGHT
public static final String KEY_TWILIGHT
public static final String KEY_HOLDTIME
public static final String KEY_SEASON
public static final String DEFNAME
private static final String DEFTIME
private static final String DEFSOLHEIGHT
private static final double DEFTWILIGHT
private static final double DEFHOLDTIME
private static final String DEFSEASON
private static final Calendar GREGORIAN
private Map weather
private Time current
private double lasttime
private SolHeight solz
| Constructor Detail |
|---|
public SeasonWeather(Map prop)
| Method Detail |
|---|
public double rescanned(String key,
String old,
String newval)
rescanned in interface Reloadablerescanned in class SimpleTriggerpublic void registerParameter(Parameter what)
registerParameter in interface ParameterDependingpublic Boolean getTrigger()
getTrigger in interface TriggergetTrigger in class SimpleTrigger
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||