All Known Implementing Classes:
AfterTomorrow , Today , Tomorrow
public interface IForecastDayTimesAndDays
Version:
17
Author:
krystof-cejchan
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods
Method Details
getMatchingObjectFrom
returns forecast for specific day and hour
Parameters:
day - for which you need the forecast
time - for which you need the forecast
Returns:
Forecast data for provided DAY and TIME ; if not found NoDataFoundForThisDayAndTime exception is thrown
Throws:
NoDataFoundForThisDayAndTime - if no forecast was included for this TIME and DAY ;
you need to use TIME.ALL with DAY.ALL if you want to prevent this
or include TIME and DAY you want to know the forecast for in the constructor when creating forecast object or its subclasses
CannotSearchForAll - DAY or TIME is set to ALL; you can get single object of ForecastAtHour only for certain DAY and TIME
clearSavedForecasts
static void clearSavedForecasts ()
getDay
Returns:
day which implementing class represents
getTime
Returns:
time provided by user when calling this class or superclass
getForecastByTime
implemented by Today, Tomorrow and AfterTomorrow, therefor no day is needed
Parameters:
time - for weather data
Returns:
ForecastAtHour object containing all data for specific day and time
Throws:
NoDataFoundForThisDayAndTime
addHour
add Forecast object
Parameters:
forecast - ForecastAtHour object containing weather data for specific day and time(hour)