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.String
ACTION_UPDATE_POLLEN
static int
Ambrosia
static int
Beifuss
static int
Birke
static int
DayAfterTomorrow
static int
Erle
static int
Esche
static int
Graeser
static int
Hasel
static int
Roggen
static int
Today
static int
Tomorrow
static java.lang.String
UPDATE_POLLEN_RESULT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
getDayShift(Context context)
static long
getLastPollenUpdateTime(Context context)
static int[]
getMinMax(java.lang.String source)
static long
getNextPollenUpdateTime(Context context)
static java.util.ArrayList<Pollen>
GetPollenData(Context context)
static Pollen
GetPollenData(Context context, PollenArea pollenArea)
int
getPollenLoad(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 boolean
isUpdateDue(Context context)
static void
WritePollenToDatabase(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)
-
isUpdateDue
public static boolean isUpdateDue(Context context)
-
getDayShift
public static int getDayShift(Context context)
-
-