Package nwsWeatherApi

Class GridpointForecastPeriod

java.lang.Object
nwsWeatherApi.ForecastPeriod
nwsWeatherApi.GridpointForecastPeriod
Direct Known Subclasses:
GridpointForecastHourlyPeriod

public class GridpointForecastPeriod extends ForecastPeriod
Holds information about GridpointForecast periods.
Author:
cobalt
  • 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

      public String shortForecast()
      Returns a short qualitative forecast.
      Returns:
    • windSpeed

      public String windSpeed()
      Returns the wind speed in miles per hour.
      Returns:
    • windDirection

      public String windDirection()
      Returns the wind direction.
      Returns:
    • temperatureTrend

      public String temperatureTrend()
      Returns the current temperature trend or null if there is none.
      Returns:
    • startTime

      public String startTime()
      Returns the start time for the forecast's validity.
      Returns:
    • endTime

      public String endTime()
      Returns the end time for the forecast's validity.
      Returns:
    • iconUrl

      public String 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: