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) 构造函数 |
Recurrence(int unit, int count) 构造函数 |
Recurrence(int unit, int count, int expectedAchievedCount) 公开构造函数 |
Modifier and Type | Method and Description |
|---|---|
int | getCount() 获取周期次数 |
int | getExpectedAchievedCount() 获取期望达标次数 |
int | getUnit() 获取周期单位 |
void | setCount(int count) 设置周期次数 |
void | setExpectedAchievedCount(int expectedAchievedCount) 设置期望达标次数 |
void | setUnit(int 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)
构造函数通常还需调用Recurrence.setCount(int)设置周期循环次数
Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | 周期单位: 1:日 2:周 3:月 |
public Recurrence(int unit, int count)
构造函数Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | 周期单位: 1:日 2:周 3:月 |
count | 周期循环次数 周期单位为天时,循环次数范围 1-366 |
public Recurrence(int unit, int count, int expectedAchievedCount)
公开构造函数Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | 周期单位: 1:日 2:周 3:月 |
count | 周期次数 |
expectedAchievedCount | 周期内期望达标次数 |
public void setUnit(int unit)
设置周期单位Parameters:
Parameter Name | Parameter Description |
|---|---|
unit | 周期单位 |