|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.weather.WeatherDistributor
public class WeatherDistributor
This class collects weather data from the local weather station and makes it available to other listening classes.
Field Summary | |
---|---|
static java.lang.String[] |
WEATHER_STATION_TYPES
Types of weather stations (abbreviations) to be appended to generic weather station data strings. |
Method Summary | |
---|---|
void |
addWeatherListener(WeatherListener l)
Register a WeatherListener to be notified of updates in the weather data. |
java.lang.Number |
get(WeatherEnum e)
Fetch a numeric value from the weather data. |
static WeatherDistributor |
getInstance()
|
static java.lang.String[] |
getWeatherModelNameStrings()
Returns an array of localized weather station model names, in the same order as the standard abbreviations. |
void |
loadCurrentWeather(java.util.Map<? extends java.lang.Enum,?> extensions)
Copy weather data from some other map into the currentWeather map in this WeatherDistributor. |
PositionlessWeatherReport |
makeWeatherMsg()
Build a PositionlessWeatherReport from the current state of the collected local weather data. |
java.util.Map<java.lang.Enum,java.lang.Object> |
parseWeatherData(java.lang.String line,
java.util.Map<java.lang.Enum,java.lang.Object> currentWeather)
|
void |
removeWeatherListener(WeatherListener l)
Deregister a WeatherListener so it will no longer be informed of changes in the local weather data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] WEATHER_STATION_TYPES
Method Detail |
---|
public static WeatherDistributor getInstance()
public java.util.Map<java.lang.Enum,java.lang.Object> parseWeatherData(java.lang.String line, java.util.Map<java.lang.Enum,java.lang.Object> currentWeather)
public void loadCurrentWeather(java.util.Map<? extends java.lang.Enum,?> extensions)
extensions
- Map of WeatherEnums to valuespublic java.lang.Number get(WeatherEnum e)
e
- WeatherEnum for the data item wanted
public void addWeatherListener(WeatherListener l)
l
- WeatherListener to registerpublic void removeWeatherListener(WeatherListener l)
l
- WeatherListener to deregisterpublic PositionlessWeatherReport makeWeatherMsg()
public static java.lang.String[] getWeatherModelNameStrings()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |