DataTypes

object DataTypes
kotlin.Any
   ↳ androidx.health.services.client.data.DataTypes

Helper class to facilitate working with DataTypes.

Summary

Public methods
DataType?

Get the aggregate DataType from a raw DataType, or null if it doesn't exist.

Set<DataType>

Get the aggregate, average, and max DataType from a raw DataType if they exist.

DataType?

Get the average DataType from a raw DataType, or null if it doesn't exist.

DataType?

Get the max DataType from a raw DataType, or null if it doesn't exist.

DataType?

Get the raw DataType from an aggregate DataType, or null if it doesn't exist.

DataType?

Get the raw DataType from an average DataType, or null if it doesn't exist.

DataType?

Get the raw DataType from a max DataType, or null if it doesn't exist.

Boolean

Check if a DataType represents aggregate value of a collection of non-aggregate data.

Boolean
isRawType(dataType: DataType)

Check if a DataType represents raw data value, i.

Boolean

Check if a DataType represents the average value of a collection of non-aggregate data.

Boolean

Check if a DataType represents the maximum value of a collection of non-aggregate data.

Public methods

getAggregateTypeFromRawType

@JvmStatic fun getAggregateTypeFromRawType(rawType: DataType): DataType?

Get the aggregate DataType from a raw DataType, or null if it doesn't exist.

getAggregatedDataTypesFromRawType

@JvmStatic fun getAggregatedDataTypesFromRawType(rawType: DataType): Set<DataType>

Get the aggregate, average, and max DataType from a raw DataType if they exist.

getAverageTypeFromRawType

@JvmStatic fun getAverageTypeFromRawType(rawType: DataType): DataType?

Get the average DataType from a raw DataType, or null if it doesn't exist.

getMaxTypeFromRawType

@JvmStatic fun getMaxTypeFromRawType(rawType: DataType): DataType?

Get the max DataType from a raw DataType, or null if it doesn't exist.

getRawTypeFromAggregateType

@JvmStatic fun getRawTypeFromAggregateType(aggregateType: DataType): DataType?

Get the raw DataType from an aggregate DataType, or null if it doesn't exist.

getRawTypeFromAverageType

@JvmStatic fun getRawTypeFromAverageType(averageType: DataType): DataType?

Get the raw DataType from an average DataType, or null if it doesn't exist.

getRawTypeFromMaxType

@JvmStatic fun getRawTypeFromMaxType(maxType: DataType): DataType?

Get the raw DataType from a max DataType, or null if it doesn't exist.

isAggregateDataType

@JvmStatic fun isAggregateDataType(dataType: DataType): Boolean

Check if a DataType represents aggregate value of a collection of non-aggregate data.

isRawType

@JvmStatic fun isRawType(dataType: DataType): Boolean

Check if a DataType represents raw data value, i.e., neither aggregate value nor statistical value.

isStatisticalAverageDataType

@JvmStatic fun isStatisticalAverageDataType(dataType: DataType): Boolean

Check if a DataType represents the average value of a collection of non-aggregate data.

isStatisticalMaxDataType

@JvmStatic fun isStatisticalMaxDataType(dataType: DataType): Boolean

Check if a DataType represents the maximum value of a collection of non-aggregate data.