Builder


class Builder
kotlin.Any
   ↳ android.health.connect.datatypes.MenstrualCyclePhaseRecord.Builder

Builder class for MenstrualCyclePhaseRecord.

Summary

Public constructors
Builder(metadata: Metadata, date: LocalDate, phase: Int)

Public methods
MenstrualCyclePhaseRecord

MenstrualCyclePhaseRecord.Builder

Clears the day of cycle for this data.

MenstrualCyclePhaseRecord.Builder

Clears the ZoneOffset of the user at the beginning of the measurement day.

MenstrualCyclePhaseRecord.Builder
setDayOfCycle(dayOfCycle: Int)

Sets the day of cycle for this data.

MenstrualCyclePhaseRecord.Builder

Sets the ZoneOffset of the user at the beginning of the measurement day.

Public constructors

Builder

Builder(
    metadata: Metadata,
    date: LocalDate,
    phase: Int)
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

fun build(): MenstrualCyclePhaseRecord
Return
MenstrualCyclePhaseRecord Object of MenstrualCyclePhaseRecord
This value cannot be null.

clearDayOfCycle

fun clearDayOfCycle(): MenstrualCyclePhaseRecord.Builder

Clears the day of cycle for this data.

Return
MenstrualCyclePhaseRecord.Builder This value cannot be null.

clearStartZoneOffset

fun clearStartZoneOffset(): MenstrualCyclePhaseRecord.Builder

Clears the ZoneOffset of the user at the beginning of the measurement day.

Return
MenstrualCyclePhaseRecord.Builder This value cannot be null.

setDayOfCycle

fun setDayOfCycle(dayOfCycle: Int): MenstrualCyclePhaseRecord.Builder

Sets the day of cycle for this data.

Parameters
dayOfCycle Int: Value is between 1 and 180 inclusive
Return
MenstrualCyclePhaseRecord.Builder This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the provided dayOfCycle is less than 1 or more than 180.

setStartZoneOffset

fun setStartZoneOffset(zoneOffset: ZoneOffset): MenstrualCyclePhaseRecord.Builder

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.
Return
MenstrualCyclePhaseRecord.Builder This value cannot be null.