Class CurrentWeatherInfo

java.lang.Object
de.kaffeemitkoffein.tinyweatherforecastgermany.CurrentWeatherInfo

public class CurrentWeatherInfo extends Object
  • Field Details

  • Constructor Details

    • CurrentWeatherInfo

      public CurrentWeatherInfo()
    • CurrentWeatherInfo

      public CurrentWeatherInfo(Context context, RawWeatherInfo rawWeatherInfo)
  • Method Details

    • setToEmpty

      public void setToEmpty()
    • getCity

      public String getCity(Context context)
    • getWindForecast

      public ArrayList<Weather.WindData> getWindForecast(int number)
    • setSunDurationFromClouds

      public Integer setSunDurationFromClouds(Weather.WeatherInfo weatherInfo)
    • iteratePositions

      public static String iteratePositions(String[] stringArray, int position, int limit)
    • interpolateConditionFromHigherIntervals

      public static String interpolateConditionFromHigherIntervals(int position, RawWeatherInfo rawWeatherInfo)
    • getConditionFromHourlyCondition

      public Integer getConditionFromHourlyCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
      Gets the most significant condition form the interval specified, or calculates it from other items
      Parameters:
      rawWeatherInfo -
      start -
      stop -
      Returns:
      true if condition could be determined, otherwise false
    • getConditionFromHourlySignificantCondition

      public Integer getConditionFromHourlySignificantCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
    • getMostSignificantCondition

      public static Integer getMostSignificantCondition(ArrayList<Integer> conditions)
    • isNewServerDataExpected

      public boolean isNewServerDataExpected(Context context)
      Checks if new Mosmix data can be expected on the DWD server.
      Returns:
      true, if new data can be expected.
    • getWhenNewServerDataExpected

      public long getWhenNewServerDataExpected(Context context)
    • getHumanReadableIssueTime

      public String getHumanReadableIssueTime()