public class WeatherData extends java.lang.Object implements Subject
Constructor and Description |
---|
WeatherData() |
Modifier and Type | Method and Description |
---|---|
float |
getHumidity() |
float |
getPressure() |
float |
getTemperature() |
void |
measurementsChanged() |
void |
notifyObservers() |
void |
registerObserver(Observer o) |
void |
removeObserver(Observer o) |
void |
setMeasurements(float temperature,
float humidity,
float pressure) |
public WeatherData()
public void registerObserver(Observer o)
registerObserver
in interface Subject
public void removeObserver(Observer o)
removeObserver
in interface Subject
public void notifyObservers()
notifyObservers
in interface Subject
public void measurementsChanged()
public void setMeasurements(float temperature, float humidity, float pressure)
public float getTemperature()
public float getHumidity()
public float getPressure()