PlannedExerciseSessionRecord.Builder
public
static
final
class
PlannedExerciseSessionRecord.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.datatypes.PlannedExerciseSessionRecord.Builder |
Builder class for PlannedExerciseSessionRecord
.
Summary
Public constructors | |
---|---|
Builder(Metadata metadata, int exerciseType, Instant startTime, Instant endTime)
|
|
Builder(Metadata metadata, int exerciseType, LocalDate startDate, Duration duration)
|
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (Metadata metadata, int exerciseType, Instant startTime, Instant endTime)
Builder
public Builder (Metadata metadata, int exerciseType, LocalDate startDate, Duration duration)
Public methods
addBlock
public PlannedExerciseSessionRecord.Builder addBlock (PlannedExerciseBlock block)
Adds a block to this planned session..
Parameters | |
---|---|
block |
PlannedExerciseBlock : An PlannedExerciseBlock to add to this planned session..
This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
build
public PlannedExerciseSessionRecord build ()
Returns PlannedExerciseSessionRecord
.
Returns | |
---|---|
PlannedExerciseSessionRecord |
This value cannot be null . |
clearBlocks
public PlannedExerciseSessionRecord.Builder clearBlocks ()
Clears the blocks of this planned session.
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
clearEndZoneOffset
public PlannedExerciseSessionRecord.Builder clearEndZoneOffset ()
Sets the start zone offset of this record to system default.
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
clearStartZoneOffset
public PlannedExerciseSessionRecord.Builder clearStartZoneOffset ()
Sets the start zone offset of this record to system default.
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setBlocks
public PlannedExerciseSessionRecord.Builder setBlocks (List<PlannedExerciseBlock> blocks)
Sets the blocks of this planned session.
Parameters | |
---|---|
blocks |
List : A list of PlannedExerciseBlock to set for this planned session.
This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setEndTime
public PlannedExerciseSessionRecord.Builder setEndTime (Instant endTime)
Sets the planned end time of the session.
Parameters | |
---|---|
endTime |
Instant : This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setEndZoneOffset
public PlannedExerciseSessionRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)
Sets the zone offset of when the workout should end.
Parameters | |
---|---|
endZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setExerciseType
public PlannedExerciseSessionRecord.Builder setExerciseType (int exerciseType)
Sets the exercise type.
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setMetadata
public PlannedExerciseSessionRecord.Builder setMetadata (Metadata metadata)
Set the metadata for the record.
Parameters | |
---|---|
metadata |
Metadata : This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setNotes
public PlannedExerciseSessionRecord.Builder setNotes (CharSequence notes)
Sets notes for this activity.
Parameters | |
---|---|
notes |
CharSequence : Notes for this activity.
This value may be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setStartTime
public PlannedExerciseSessionRecord.Builder setStartTime (Instant startTime)
Sets the planned start time of the session.
Parameters | |
---|---|
startTime |
Instant : This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setStartZoneOffset
public PlannedExerciseSessionRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)
Sets the zone offset of when the workout should start.
Parameters | |
---|---|
startZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |
setTitle
public PlannedExerciseSessionRecord.Builder setTitle (CharSequence title)
Sets a title of this planned session.
Parameters | |
---|---|
title |
CharSequence : Title of this activity.
This value may be null . |
Returns | |
---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null . |