Page Summary
-
Goal.Recurrence represents a recurrence period for a recurring goal.
-
It includes constants for representing days, weeks, and months as units of recurrence.
-
The class provides methods to get the count and unit of the recurrence period.
-
Goal.Recurrence implements the Parcelable interface, allowing it to be written to and read from a Parcel.
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 final Creator<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(Parcel dest, int
flags)
|
Inherited Method Summary
Constants
public static final int UNIT_DAY
Unit constant representing a day.
public static final int UNIT_MONTH
Unit constant representing a month.
public static final int UNIT_WEEK
Unit constant representing a week.
Fields
public static final Creator<Goal.Recurrence> CREATOR
Public Constructors
public Recurrence (int count, int unit)
Public Methods
public boolean equals (Object other)
public int getCount ()
Returns the count of unit of the recurrence. For example, it would return '3' for a goal that recurs every 3 days.
public int getUnit ()
Returns the unit of the recurrence. The unit should be one of UNIT_DAY,
UNIT_WEEK and
UNIT_MONTH.