Added in API level 34
LeanBodyMassRecord.Builder
public
static
final
class
LeanBodyMassRecord.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.datatypes.LeanBodyMassRecord.Builder |
Builder class for LeanBodyMassRecord
Summary
Public constructors | |
---|---|
Builder(Metadata metadata, Instant time, Mass mass)
|
Public methods | |
---|---|
LeanBodyMassRecord
|
build()
|
LeanBodyMassRecord.Builder
|
clearZoneOffset()
Sets the zone offset of this record to system default. |
LeanBodyMassRecord.Builder
|
setZoneOffset(ZoneOffset zoneOffset)
Sets the zone offset of the user when the activity happened |
Inherited methods | |
---|---|
Public constructors
Builder
Added in API level 34
public Builder (Metadata metadata, Instant time, Mass mass)
Parameters | |
---|---|
metadata |
Metadata : Metadata to be associated with the record. See Metadata .
This value cannot be null . |
time |
Instant : Start time of this activity
This value cannot be null . |
mass |
Mass : Mass in Mass unit. Required field. Valid range: 0-1000000 grams.
This value cannot be null . |
Public methods
build
Added in API level 34
public LeanBodyMassRecord build ()
Returns | |
---|---|
LeanBodyMassRecord |
Object of LeanBodyMassRecord
This value cannot be null . |
clearZoneOffset
Added in API level 34
public LeanBodyMassRecord.Builder clearZoneOffset ()
Sets the zone offset of this record to system default.
Returns | |
---|---|
LeanBodyMassRecord.Builder |
This value cannot be null . |
setZoneOffset
Added in API level 34
public LeanBodyMassRecord.Builder setZoneOffset (ZoneOffset zoneOffset)
Sets the zone offset of the user when the activity happened
Parameters | |
---|---|
zoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
LeanBodyMassRecord.Builder |
This value cannot be null . |