Package com.aerisweather.aeris.response
Class PeriodsResponse<T extends AbstractPeriod>
- java.lang.Object
- 
- com.aerisweather.aeris.response.AerisFriendlyResponse
- 
- com.aerisweather.aeris.response.PeriodsResponse<T>
 
 
- 
- Type Parameters:
- T- Type of period to use
 - Direct Known Subclasses:
- ConditionsResponse,- ConditionsSummaryResponse,- ForecastsResponse,- NormalsResponse,- ObArchiveResponse,- ObSummaryResponse,- TidesResponse
 
 public class PeriodsResponse<T extends AbstractPeriod> extends AerisFriendlyResponse Helper class that handles accessing period information from specific responses
- 
- 
Constructor SummaryConstructors Constructor Description PeriodsResponse(AerisDataJSON data, Class<T> clazz)Period response constructor that needs
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetPeriod(int index)Get a period from the listList<T>getPeriods()Gets the list of the periods.intgetPeriodsSize()Get the number of periods- 
Methods inherited from class com.aerisweather.aeris.response.AerisFriendlyResponsegetDataSource, getId, getLocation, getPlace, getProfile, getProfileTimezone, getRelative
 
- 
 
- 
- 
- 
Field Detail- 
periodsprotected List<T extends AbstractPeriod> periods List of periods
 - 
clazzprotected Class<T extends AbstractPeriod> clazz The class type used to instantiate a type of the generic
 
- 
 - 
Constructor Detail- 
PeriodsResponsepublic PeriodsResponse(AerisDataJSON data, Class<T> clazz) Period response constructor that needs- Parameters:
- data- data to pass to the AerisFriendlyResponse
- clazz- the class type of the AbstractPeriod to be able to instantiate the generic
 
 
- 
 - 
Method Detail- 
getPeriodspublic List<T> getPeriods() Gets the list of the periods.- Returns:
- The list of the Period.
 
 - 
getPeriodsSizepublic int getPeriodsSize() Get the number of periods- Returns:
- the number of periods.
 
 - 
getPeriodpublic T getPeriod(int index) Get a period from the list- Parameters:
- index- to grab from the list of periods.
- Returns:
- The period
 
 
- 
 
-