public enum UpdatePolicy extends java.lang.Enum<UpdatePolicy>
Enum Constant and Description |
---|
BI_WEEKLY
The update is made every second week.
|
MONTHLY
The update is made once a month.
|
NOW
The update is made now, regardless when the last one was.
|
WEEKLY
The update is made once a week.
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldUpdate(java.util.Date lastUpdate)
Checks if the interval of this
UpdatePolicy is over in regard to the lastUpdate . |
static UpdatePolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static UpdatePolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UpdatePolicy NOW
public static final UpdatePolicy WEEKLY
RemoteNotifications
uses an internal shared preference to track when the last update
was.public static final UpdatePolicy BI_WEEKLY
RemoteNotifications
uses an internal shared preference to track when the last update
was.public static final UpdatePolicy MONTHLY
RemoteNotifications
uses an internal shared preference to track when the last
update was.public static UpdatePolicy[] values()
for (UpdatePolicy c : UpdatePolicy.values()) System.out.println(c);
public static UpdatePolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean shouldUpdate(java.util.Date lastUpdate)
UpdatePolicy
is over in regard to the lastUpdate
.lastUpdate
- The Date
of the last update.true
if an update should be done, else false
.