MenstrualCyclePhaseRecord.Builder
public
static
final
class
MenstrualCyclePhaseRecord.Builder
extends Object
| java.lang.Object | |
| ↳ | android.health.connect.datatypes.MenstrualCyclePhaseRecord.Builder |
Builder class for MenstrualCyclePhaseRecord.
Summary
Public constructors | |
|---|---|
Builder(Metadata metadata, LocalDate date, int phase)
|
|
Public methods | |
|---|---|
MenstrualCyclePhaseRecord
|
build()
|
MenstrualCyclePhaseRecord.Builder
|
clearDayOfCycle()
Clears the day of cycle for this data. |
MenstrualCyclePhaseRecord.Builder
|
clearStartZoneOffset()
Clears the |
MenstrualCyclePhaseRecord.Builder
|
setDayOfCycle(int dayOfCycle)
Sets the day of cycle for this data. |
MenstrualCyclePhaseRecord.Builder
|
setStartZoneOffset(ZoneOffset zoneOffset)
Sets the |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (Metadata metadata, LocalDate date, int phase)
| Parameters | |
|---|---|
metadata |
Metadata: Metadata to be associated with the record. See Metadata.
This value cannot be null. |
date |
LocalDate: The date of this record.
This value cannot be null. |
phase |
int: The cycle phase for this record.
Value is one of the following: |
Public methods
build
public MenstrualCyclePhaseRecord build ()
| Returns | |
|---|---|
MenstrualCyclePhaseRecord |
Object of MenstrualCyclePhaseRecord
This value cannot be null. |
clearDayOfCycle
public MenstrualCyclePhaseRecord.Builder clearDayOfCycle ()
Clears the day of cycle for this data.
| Returns | |
|---|---|
MenstrualCyclePhaseRecord.Builder |
This value cannot be null. |
clearStartZoneOffset
public MenstrualCyclePhaseRecord.Builder clearStartZoneOffset ()
Clears the ZoneOffset of the user at the beginning of the measurement day.
| Returns | |
|---|---|
MenstrualCyclePhaseRecord.Builder |
This value cannot be null. |
setDayOfCycle
public MenstrualCyclePhaseRecord.Builder setDayOfCycle (int dayOfCycle)
Sets the day of cycle for this data.
| Parameters | |
|---|---|
dayOfCycle |
int: Value is between 1 and 180 inclusive |
| Returns | |
|---|---|
MenstrualCyclePhaseRecord.Builder |
This value cannot be null. |
| Throws | |
|---|---|
IllegalArgumentException |
if the provided dayOfCycle is less than 1 or
more than 180. |
setStartZoneOffset
public MenstrualCyclePhaseRecord.Builder setStartZoneOffset (ZoneOffset zoneOffset)
Sets the ZoneOffset of the user at the beginning of the measurement day.
If not set, the system default zone offset will be used.
| Parameters | |
|---|---|
zoneOffset |
ZoneOffset: This value cannot be null. |
| Returns | |
|---|---|
MenstrualCyclePhaseRecord.Builder |
This value cannot be null. |