java.lang.Object |---com.huawei.hihealth.model.Recurrence public class Recurrence extends java.lang.Object implements android.os.Parcelable |
Since:
2022-03-31Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
android.os.Parcelable.ClassLoaderCreator, android.os.Parcelable.Creator |
Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
Constructor and Description |
|---|
Recurrence(int unit) Constructor. |
Recurrence(int unit, int count) Constructor. |
Recurrence(int unit, int count, int expectedAchievedCount) Public constructor. |
Modifier and Type | Method and Description |
|---|---|
int | getCount() Obtains the number of periods. |
int | getExpectedAchievedCount() Obtains the expected achievement times. |
int | getUnit() Obtains the period unit. |
void | setCount(int count) Sets the number of periods. |
void | setExpectedAchievedCount(int expectedAchievedCount) Sets the expected achievement times. |
void | setUnit(int unit) Sets the period unit. |
Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface android.os.Parcelable |
|---|
describeContents, writeToParcel |
public Recurrence(int unit)
Constructor.Generally, you also need to set the number of periods by calling Recurrence.setCount(int).
Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | Period unit. The options are 1 (day), 2 (week), and 3 (month). |
public Recurrence(int unit, int count)
Constructor.Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | Period unit. The options are 1 (day), 2 (week), and 3 (month). |
count | Number of periods. When the period unit is day, this parameter ranges from 1 to 366. |
public Recurrence(int unit, int count, int expectedAchievedCount)
Public constructor.Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | Period unit. The options are 1 (day), 2 (week), and 3 (month). |
count | Number of periods. |
expectedAchievedCount | Expected achievement times in the entire period. |
public void setUnit(int unit)
Sets the period unit.Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | Period unit. |
public void setCount(int count)
Sets the number of periods.Parameters:
Parameter Name | Parameter Description |
|---|---|
count | Number of periods. |