Package nwsWeatherApi
Class GridpointForecastPeriod
java.lang.Object
nwsWeatherApi.ForecastPeriod
nwsWeatherApi.GridpointForecastPeriod
- Direct Known Subclasses:
GridpointForecastHourlyPeriod
Holds information about
GridpointForecast periods.- Author:
- cobalt
-
Constructor Summary
ConstructorsConstructorDescriptionGridpointForecastPeriod(com.github.cliftonlabs.json_simple.JsonObject obj) Creates a GridpointForecastPeriod from a valid JSON of the NWS API GridpointForecast schema. -
Method Summary
Modifier and TypeMethodDescriptionendTime()Returns the end time for the forecast's validity.iconUrl()Returns the URL for the icon used in the NWS forecast.booleanReturns whether the period occurs during the day or the night.intReturns the number of the forecast period in the full forecast request.Returns a short qualitative forecast.Returns the start time for the forecast's validity.intReturns the temperature.Returns the current temperature trend or null if there is none.charReturns the letter abbreviation of the temperature scale in use.Returns the wind direction.Returns the wind speed in miles per hour.Methods inherited from class nwsWeatherApi.ForecastPeriod
name, text, toString
-
Constructor Details
-
GridpointForecastPeriod
public GridpointForecastPeriod(com.github.cliftonlabs.json_simple.JsonObject obj) Creates a GridpointForecastPeriod from a valid JSON of the NWS API GridpointForecast schema.- Parameters:
obj-
-
-
Method Details
-
shortForecast
Returns a short qualitative forecast.- Returns:
-
windSpeed
Returns the wind speed in miles per hour.- Returns:
-
windDirection
Returns the wind direction.- Returns:
-
temperatureTrend
Returns the current temperature trend or null if there is none.- Returns:
-
startTime
Returns the start time for the forecast's validity.- Returns:
-
endTime
Returns the end time for the forecast's validity.- Returns:
-
iconUrl
Returns the URL for the icon used in the NWS forecast.- Returns:
-
temperature
public int temperature()Returns the temperature.- Returns:
-
periodNumber
public int periodNumber()Returns the number of the forecast period in the full forecast request.- Returns:
-
temperatureUnit
public char temperatureUnit()Returns the letter abbreviation of the temperature scale in use.- Returns:
-
isDaytime
public boolean isDaytime()Returns whether the period occurs during the day or the night.- Returns:
-