public class WeatherDistributor
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
WEATHER_STATION_TYPES
Types of weather stations (abbreviations) to be appended to generic weather station data strings.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String[] WEATHER_STATION_TYPES
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 wantedpublic void addWeatherListener(WeatherListener l)
l - WeatherListener to registerpublic void removeWeatherListener(WeatherListener l)
l - WeatherListener to deregisterpublic PositionlessWeatherReport makeWeatherMsg()
public static java.lang.String[] getWeatherModelNameStrings()