Class Pollen
- java.lang.Object
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.Pollen
-
public class Pollen extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTION_UPDATE_POLLENstatic intAmbrosiastatic intBeifussstatic intBirkestatic intDayAfterTomorrowstatic intErlestatic intEschestatic intGraeserstatic intHaselstatic intRoggenstatic intTodaystatic intTomorrowstatic java.lang.StringUPDATE_POLLEN_RESULT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDayShift(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[]getMinMax(java.lang.String source)static longgetNextPollenUpdateTime(Context context)static java.util.ArrayList<Pollen>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, java.util.ArrayList<Pollen> pollenArrayList)
-
-
-
Field Detail
-
Ambrosia
public static final int Ambrosia
- See Also:
- Constant Field Values
-
Beifuss
public static final int Beifuss
- See Also:
- Constant Field Values
-
Roggen
public static final int Roggen
- See Also:
- Constant Field Values
-
Esche
public static final int Esche
- See Also:
- Constant Field Values
-
Birke
public static final int Birke
- See Also:
- Constant Field Values
-
Hasel
public static final int Hasel
- See Also:
- Constant Field Values
-
Erle
public static final int Erle
- See Also:
- Constant Field Values
-
Graeser
public static final int Graeser
- See Also:
- Constant Field Values
-
Today
public static final int Today
- See Also:
- Constant Field Values
-
Tomorrow
public static final int Tomorrow
- See Also:
- Constant Field Values
-
DayAfterTomorrow
public static final int DayAfterTomorrow
- See Also:
- Constant Field Values
-
ACTION_UPDATE_POLLEN
public static final java.lang.String ACTION_UPDATE_POLLEN
- See Also:
- Constant Field Values
-
UPDATE_POLLEN_RESULT
public static final java.lang.String UPDATE_POLLEN_RESULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Pollen
public Pollen()
-
Pollen
public Pollen(Pollen source)
-
-
Method Detail
-
getMinMax
public static int[] getMinMax(java.lang.String source)
-
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
public static void WritePollenToDatabase(Context context, java.util.ArrayList<Pollen> pollenArrayList)
-
GetPollenData
public static Pollen GetPollenData(Context context, PollenArea pollenArea)
-
GetPollenData
public static java.util.ArrayList<Pollen> GetPollenData(Context context)
-
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.
-
-