目录

Recurrence

java.lang.Object

|---com.huawei.hihealth.model.Recurrence

public class Recurrence
extends java.lang.Object
implements android.os.Parcelable
Event report frequency.

Since:

2022-03-31

Nested Class Summary

Nested classes/interfaces inherited from interface android.os.Parcelable

android.os.Parcelable.ClassLoaderCreator, android.os.Parcelable.Creator

Field Summary

Fields inherited from interface android.os.Parcelable

CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE

Constructor Summary

Constructor and Description

Recurrence(int unit) Constructor.

Recurrence(int unit, int count) Constructor.

Recurrence(int unit, int count, int expectedAchievedCount) Public constructor.

Method Summary

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

Constructor Detail

[h2]Recurrence

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).

[h2]Recurrence

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.

[h2]Recurrence

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.

Method Detail

[h2]getUnit

public int getUnit()

Obtains the period unit.

Returns:

Period unit.

[h2]setUnit

public void setUnit(int unit)

Sets the period unit.

Parameters:

Parameter Name

Parameter Description

unit

Period unit.

[h2]getCount

public int getCount()

Obtains the number of periods.

Returns:

Number of periods.

[h2]setCount

public void setCount(int count)

Sets the number of periods.

Parameters:

Parameter Name

Parameter Description

count

Number of periods.

[h2]getExpectedAchievedCount

public int getExpectedAchievedCount()

Obtains the expected achievement times.

Returns:

Expected achievement times.

[h2]setExpectedAchievedCount

public void setExpectedAchievedCount(int expectedAchievedCount)

Set the expected achievement times.

Parameters:

Parameter Name

Parameter Description

expectedAchievedCount

Expected achievement times.