@Service public class WeatherForecastRepo extends Object implements DomainRepo
Constructor and Description |
---|
WeatherForecastRepo()
standard constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(WeatherForecast weather)
Adds a WeatherForecast to the repo
|
List<WeatherForecast> |
allWeatherForecasts()
Returns a list of all the issued weather forecast up to the
currentTimeslot
|
int |
count()
Returns the number of WeatherForecasts that have been successfully
created.
|
WeatherForecast |
currentWeatherForecast()
Returns the current WeatherForecast
|
void |
recycle()
Implementations must clear out the repository in preparation for
a new simulation.
|
void |
runOnce()
Called by weather service to indicate weather exists
|
public void add(WeatherForecast weather)
public WeatherForecast currentWeatherForecast() throws PowerTacException
PowerTacException
public List<WeatherForecast> allWeatherForecasts()
public int count()
public void runOnce()
public void recycle()
DomainRepo
recycle
in interface DomainRepo
Copyright © 2019 Power TAC. All rights reserved.