MilestoneMarkerSummary


public final class MilestoneMarkerSummary


The summary of metrics and state from the previously achieved milestone marker ExerciseGoal.

Summary

Public constructors

MilestoneMarkerSummary(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    @NonNull Duration activeDuration,
    @NonNull ExerciseGoal<@NonNull Number> achievedGoal,
    @NonNull DataPointContainer summaryMetrics
)

Public methods

final @NonNull ExerciseGoal<@NonNull Number>

The ExerciseGoal that triggered this milestone summary.

final @NonNull Duration

Returns the total elapsed time for which the exercise was active during this milestone, i.e. started but not paused.

final @NonNull Instant

Returns the time at which this milestone marker was reached.

final @NonNull Instant

Returns the time at which this milestone marker started being tracked.

final @NonNull DataPointContainer

Returns the DataPointContainer for aggregated metrics tracked between startTime and endTime i.e. during the duration of this milestone.

@NonNull String

Public constructors

MilestoneMarkerSummary

Added in 1.0.0
public MilestoneMarkerSummary(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    @NonNull Duration activeDuration,
    @NonNull ExerciseGoal<@NonNull Number> achievedGoal,
    @NonNull DataPointContainer summaryMetrics
)

Public methods

getAchievedGoal

Added in 1.0.0
public final @NonNull ExerciseGoal<@NonNull NumbergetAchievedGoal()

The ExerciseGoal that triggered this milestone summary.

getActiveDuration

Added in 1.0.0
public final @NonNull Duration getActiveDuration()

Returns the total elapsed time for which the exercise was active during this milestone, i.e. started but not paused.

getEndTime

Added in 1.0.0
public final @NonNull Instant getEndTime()

Returns the time at which this milestone marker was reached.

getStartTime

Added in 1.0.0
public final @NonNull Instant getStartTime()

Returns the time at which this milestone marker started being tracked.

getSummaryMetrics

Added in 1.0.0
public final @NonNull DataPointContainer getSummaryMetrics()

Returns the DataPointContainer for aggregated metrics tracked between startTime and endTime i.e. during the duration of this milestone. This summary will only contain DataPoints for AggregateDataTypes.

toString

public @NonNull String toString()