added Javadoc and the Statistics URL

Change-Id: I36f2e9d375ed455f0d1d13d3091dc6f51b0b6637
This commit is contained in:
Axel Uhl committed 2018-01-02 17:08:51 +01:00
1 parent 2ef71fdf9c
commit 6e88b42ffb
2 files changed
+16

No files matched your search

@@ -25,7 +25,18 @@ public interface Spot extends NamedWithID, Positioned {
*/
String getKeyword();
/**
* @return the URL of a web page showing a current weather report for this spot
*/
URL getReportUrl() throws MalformedURLException;
/**
* @return the URL of a web page showing a weather forecast for this spot
*/
URL getForecastUrl() throws MalformedURLException;
/**
* @return the URL of a web page showing general wind statistics for this spot
*/
URL getStatisticsUrl() throws MalformedURLException;
}
@@ -12,6 +12,7 @@ public class SpotImpl extends NamedImpl implements Spot {
private static final String BASE_URL = "https://www.windfinder.com";
private static final String BASE_REPORT_URL = BASE_URL + "/report";
private static final String BASE_FORECAST_URL = BASE_URL + "/forecast";
private static final String BASE_STATISTICS_URL = BASE_URL + "/windstatistics";
private final String id;
private final String keyword;
@@ -49,4 +50,8 @@ public class SpotImpl extends NamedImpl implements Spot {
return new URL(BASE_FORECAST_URL+"/"+getKeyword());
}
@Override
public URL getStatisticsUrl() throws MalformedURLException {
return new URL(BASE_STATISTICS_URL+"/"+getKeyword());
}
}