A recurrence period of a recurring goal.
Nested Class Summary
@interface | Goal.Recurrence.RecurrenceUnit | Unit of a recurrence. |
Constant Summary
int | UNIT_DAY | Unit constant representing a day. |
int | UNIT_MONTH | Unit constant representing a month. |
int | UNIT_WEEK | Unit constant representing a week. |
Inherited Constant Summary
Field Summary
public static finalCreator<Goal.Recurrence> | CREATOR |
Public Constructor Summary
Recurrence(int count, int unit)
|
Public Method Summary
boolean | |
int |
getCount()
Returns the count of unit of the recurrence.
|
int |
getUnit()
Returns the unit of the recurrence.
|
int |
hashCode()
|
String |
toString()
|
void |
writeToParcel(Parceldest, int
flags)
|
Inherited Method Summary
Constants
public static final int UNIT_DAY
Unit constant representing a day.
Constant Value:1
public static final int UNIT_MONTH
Unit constant representing a month.
Constant Value:3
public static final int UNIT_WEEK
Unit constant representing a week.
Constant Value:2
Fields
public static finalCreator<Goal.Recurrence> CREATOR
Public Constructors
publicRecurrence(int count, int unit)
Public Methods
public booleanequals(Objectother)
public intgetCount()
Returns the count of unit of the recurrence. For example, it would return '3' for a goal that recurs every 3 days.
public intgetUnit()
Returns the unit of the recurrence. The unit should be one ofUNIT_DAY
,
UNIT_WEEK
and
UNIT_MONTH
.