DataPointContainer


class DataPointContainer

Container that provides ease of use methods to access DataPoints in a type safe way.

Example:

dataPointContainer.getData(DataType.LOCATION).forEach { location ->
Log.d(TAG, "location = ${location.latitude}, ${location.longitude}")
}

Summary

Public constructors

DataPointContainer(dataPointList: List<DataPoint<*>>)

Constructs a DataPointContainer using a list of DataPoints.

DataPointContainer(dataPoints: Map<DataType<*, *>, List<DataPoint<*>>>)

Public functions

D?
Number, D : DataPoint> getData(type: AggregateDataType)

Returns the DataPoint object with a matching aggregate type, otherwise null if exist in this DataPointContainer.

List
Any, D : DataPoint> getData(type: DeltaDataType)

Returns all DataPoint objects with a matching delta type.

Public properties

List<CumulativeDataPoint<*>>

Returns all CumulativeDataPoints contained in this update.

Set<DataType<*, *>>

Set of DataTypes contained within this DataPointContainer.

List<IntervalDataPoint<*>>

Returns all IntervalDataPoints contained in this update.

List<SampleDataPoint<*>>

Returns all SampleDataPoints contained in this update.

List<StatisticalDataPoint<*>>

Returns all StatisticalDataPoints contained in this update.

Public constructors

DataPointContainer

DataPointContainer(dataPointList: List<DataPoint<*>>)

Constructs a DataPointContainer using a list of DataPoints.

DataPointContainer

DataPointContainer(dataPoints: Map<DataType<*, *>, List<DataPoint<*>>>)

Public functions

getData

Added in 1.0.0
fun Number, D : DataPoint> getData(type: AggregateDataType): D?

Returns the DataPoint object with a matching aggregate type, otherwise null if exist in this DataPointContainer.

getData

Added in 1.0.0
fun Any, D : DataPoint> getData(type: DeltaDataType): List

Returns all DataPoint objects with a matching delta type.

Public properties

cumulativeDataPoints

Added in 1.0.0
val cumulativeDataPointsList<CumulativeDataPoint<*>>

Returns all CumulativeDataPoints contained in this update.

dataTypes

Added in 1.0.0
val dataTypesSet<DataType<*, *>>

Set of DataTypes contained within this DataPointContainer.

intervalDataPoints

Added in 1.0.0
val intervalDataPointsList<IntervalDataPoint<*>>

Returns all IntervalDataPoints contained in this update.

sampleDataPoints

Added in 1.0.0
val sampleDataPointsList<SampleDataPoint<*>>

Returns all SampleDataPoints contained in this update.

statisticalDataPoints

Added in 1.0.0
val statisticalDataPointsList<StatisticalDataPoint<*>>

Returns all StatisticalDataPoints contained in this update.