AI-generated Key Takeaways
-
LocalDataPoint
represents a single data point in a fitness data stream, holding values for each field and a time interval. -
Data points can represent instantaneous readings or aggregates over a time interval, depending on the associated data type.
-
LocalDataPoint
objects contain one value for each field defined in theLocalDataType
. -
Key methods include
getDataType()
,getEndTime()
,getStartTime()
, andgetValue()
to access data point information. -
getValue()
allows retrieving or setting the value associated with a specific field within the data point.
Represents a single data point in a LocalDataType
's
stream. A data point holds a value for each field and a time interval. The exact semantics of
each of these attributes is specified in the documentation for the particular data type,
which can be found in the appropriate constant in LocalDataType
.
A data point can represent a instantaneous reading as well as aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type.
LocalDataPoint
s always contain one value for each data type LocalField
.
Public Method Summary
boolean | |
LocalDataType |
getDataType()
Returns the data type defining the format of the values in this data point.
|
long |
getEndTime(TimeUnit
timeUnit)
Returns the end time of the interval represented by this data point, in the
given unit since epoch.
|
long |
getStartTime(TimeUnit
timeUnit)
Returns the start time of the interval represented by this data point, in the
given unit since epoch.
|
LocalValue | |
int |
hashCode()
|
String |
toString()
|
Inherited Method Summary
Public Methods
public boolean equals (Object other)
public LocalDataType getDataType ()
Returns the data type defining the format of the values in this data point.
public long getEndTime (TimeUnit timeUnit)
Returns the end time of the interval represented by this data point, in the given unit since epoch.
public long getStartTime (TimeUnit timeUnit)
Returns the start time of the interval represented by this data point, in the given unit since epoch.
public LocalValue getValue (LocalField field)
Returns the value holder for the field with the given name. This method can be used both to query the value and to set it.
Parameters
field | One of the fields of this data type. |
---|
Returns
- The value associated with the given field.
Throws
IllegalArgumentException | If the given field doesn't match any of the fields for this data point's data type. |
---|