DataPoint.Companion

object DataPoint.Companion


Summary

Public methods

final @NonNull DataPoint
createInterval(
    DataType dataType,
    Value value,
    Duration startDurationFromBoot,
    Duration endDurationFromBoot,
    Bundle metadata,
    DataPointAccuracy accuracy
)

Returns a DataPoint representing the value of type dataType from startDurationFromBoot to endDurationFromBoot.

final @NonNull DataPoint
createSample(
    DataType dataType,
    Value value,
    Duration durationFromBoot,
    Bundle metadata,
    DataPointAccuracy accuracy
)

Returns a DataPoint representing the value of type dataType at durationFromBoot.

Public fields

CREATOR

public final @NonNull Parcelable.Creator<@NonNull DataPointCREATOR

Public methods

createInterval

public final @NonNull DataPoint createInterval(
    DataType dataType,
    Value value,
    Duration startDurationFromBoot,
    Duration endDurationFromBoot,
    Bundle metadata,
    DataPointAccuracy accuracy
)

Returns a DataPoint representing the value of type dataType from startDurationFromBoot to endDurationFromBoot.

Throws
kotlin.IllegalArgumentException

if the DataType.TimeType of the associated DataType is not DataType.TimeType.INTERVAL, or if data is malformed

createSample

public final @NonNull DataPoint createSample(
    DataType dataType,
    Value value,
    Duration durationFromBoot,
    Bundle metadata,
    DataPointAccuracy accuracy
)

Returns a DataPoint representing the value of type dataType at durationFromBoot.

Throws
kotlin.IllegalArgumentException

if the DataType.TimeType of the associated DataType is not DataType.TimeType.SAMPLE, or if data is malformed