@Service public class WeatherReportRepo extends Object implements DomainRepo
Constructor and Description |
---|
WeatherReportRepo()
standard constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(WeatherReport weather)
Adds a WeatherReport to the repo
|
List<WeatherReport> |
allWeatherReports()
Returns a list of all the issued weather reports up to the
currentTimeslot
|
int |
count()
Returns the number of weatherReports that have been successfully added.
|
WeatherReport |
currentWeatherReport()
Returns the current weatherReport
|
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(WeatherReport weather)
public WeatherReport currentWeatherReport() throws PowerTacException
PowerTacException
public List<WeatherReport> allWeatherReports()
public int count()
public void runOnce()
public void recycle()
DomainRepo
recycle
in interface DomainRepo
Copyright © 2019 Power TAC. All rights reserved.