Class Pollen
java.lang.Object
de.kaffeemitkoffein.tinyweatherforecastgermany.Pollen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDayShift(Context context) Determines day shift for some marginal conditions where the number of pollen forecast days is below three.static longgetLastPollenUpdateTime(Context context) static int[]static longgetNextPollenUpdateTime(Context context) GetPollenData(Context context) static PollenGetPollenData(Context context, PollenArea pollenArea) intgetPollenLoad(Context context, int type, int timeParam) Returns the pollen load (0-6) for the pollen type on a given day.int[]getValueArray(int type) static voidWritePollenToDatabase(Context context, ArrayList<Pollen> pollenArrayList)
-
Field Details
-
Ambrosia
public static final int Ambrosia- See Also:
-
Beifuss
public static final int Beifuss- See Also:
-
Roggen
public static final int Roggen- See Also:
-
Esche
public static final int Esche- See Also:
-
Birke
public static final int Birke- See Also:
-
Hasel
public static final int Hasel- See Also:
-
Erle
public static final int Erle- See Also:
-
Graeser
public static final int Graeser- See Also:
-
Today
public static final int Today- See Also:
-
Tomorrow
public static final int Tomorrow- See Also:
-
DayAfterTomorrow
public static final int DayAfterTomorrow- See Also:
-
ACTION_UPDATE_POLLEN
- See Also:
-
UPDATE_POLLEN_RESULT
- See Also:
-
-
Constructor Details
-
Pollen
public Pollen() -
Pollen
-
-
Method Details
-
getMinMax
-
getValueArray
public int[] getValueArray(int type) -
getPollenLoad
public int getPollenLoad(Context context, int type, int timeParam) Returns the pollen load (0-6) for the pollen type on a given day.- Parameters:
context- the calling contexttype- pollen type, e.g. Ambrosia. Valid values are 0-7.timeParam- 0 = today, 1 = tomorrow, 2 = day after tomorrow.- Returns:
- the pollen load (0-6). Will return -1 when the load cannot be determined, either because there is no data and/or the parameters are invalid.
-
WritePollenToDatabase
-
GetPollenData
-
GetPollenData
-
getNextPollenUpdateTime
public static long getNextPollenUpdateTime(Context context) -
getLastPollenUpdateTime
public static long getLastPollenUpdateTime(Context context) -
getDayShift
public int getDayShift(Context context) Determines day shift for some marginal conditions where the number of pollen forecast days is below three.- Parameters:
context-- Returns:
- day shift in number of days, always zero (no shift necessary) or positive.
-