Builder
class Builder
kotlin.Any | |
↳ | android.health.connect.datatypes.NutritionRecord.Builder |
Builder class for NutritionRecord
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
NutritionRecord |
build() |
NutritionRecord.Builder |
Sets the start zone offset of this record to system default. |
NutritionRecord.Builder |
Sets the start zone offset of this record to system default. |
NutritionRecord.Builder |
Sets the biotin of this activity |
NutritionRecord.Builder |
setCaffeine(caffeine: Mass?) Sets the caffeine of this activity |
NutritionRecord.Builder |
setCalcium(calcium: Mass?) Sets the calcium of this activity |
NutritionRecord.Builder |
setChloride(chloride: Mass?) Sets the chloride of this activity |
NutritionRecord.Builder |
setCholesterol(cholesterol: Mass?) Sets the cholesterol of this activity |
NutritionRecord.Builder |
setChromium(chromium: Mass?) Sets the chromium of this activity |
NutritionRecord.Builder |
Sets the copper of this activity |
NutritionRecord.Builder |
setDietaryFiber(dietaryFiber: Mass?) Sets the dietaryFiber of this activity |
NutritionRecord.Builder |
setEndZoneOffset(endZoneOffset: ZoneOffset) Sets the zone offset of the user when the activity ended |
NutritionRecord.Builder |
Sets the energy of this activity |
NutritionRecord.Builder |
setEnergyFromFat(energyFromFat: Energy?) Sets the energyFromFat of this activity |
NutritionRecord.Builder |
Sets the folate of this activity |
NutritionRecord.Builder |
setFolicAcid(folicAcid: Mass?) Sets the folicAcid of this activity |
NutritionRecord.Builder |
Sets the iodine of this activity |
NutritionRecord.Builder |
Sets the iron of this activity |
NutritionRecord.Builder |
setMagnesium(magnesium: Mass?) Sets the magnesium of this activity |
NutritionRecord.Builder |
setManganese(manganese: Mass?) Sets the manganese of this activity |
NutritionRecord.Builder |
setMealName(mealName: String) Sets the name of this activity |
NutritionRecord.Builder |
setMealType(mealType: Int) Sets the mealType of this activity |
NutritionRecord.Builder |
setMolybdenum(molybdenum: Mass?) Sets the molybdenum of this activity |
NutritionRecord.Builder |
setMonounsaturatedFat(monounsaturatedFat: Mass?) Sets the monounsaturatedFat of this activity |
NutritionRecord.Builder |
Sets the niacin of this activity |
NutritionRecord.Builder |
setPantothenicAcid(pantothenicAcid: Mass?) Sets the pantothenicAcid of this activity |
NutritionRecord.Builder |
setPhosphorus(phosphorus: Mass?) Sets the phosphorus of this activity |
NutritionRecord.Builder |
setPolyunsaturatedFat(polyunsaturatedFat: Mass?) Sets the polyunsaturatedFat of this activity |
NutritionRecord.Builder |
setPotassium(potassium: Mass?) Sets the potassium of this activity |
NutritionRecord.Builder |
setProtein(protein: Mass?) Sets the protein of this activity |
NutritionRecord.Builder |
setRiboflavin(riboflavin: Mass?) Sets the riboflavin of this activity |
NutritionRecord.Builder |
setSaturatedFat(saturatedFat: Mass?) Sets the saturatedFat of this activity |
NutritionRecord.Builder |
setSelenium(selenium: Mass?) Sets the selenium of this activity |
NutritionRecord.Builder |
Sets the sodium of this activity |
NutritionRecord.Builder |
setStartZoneOffset(startZoneOffset: ZoneOffset) Sets the zone offset of the user when the activity started |
NutritionRecord.Builder |
Sets the sugar of this activity |
NutritionRecord.Builder |
setThiamin(thiamin: Mass?) Sets the thiamin of this activity |
NutritionRecord.Builder |
setTotalCarbohydrate(totalCarbohydrate: Mass?) Sets the totalCarbohydrate of this activity |
NutritionRecord.Builder |
setTotalFat(totalFat: Mass?) Sets the totalFat of this activity |
NutritionRecord.Builder |
setTransFat(transFat: Mass?) Sets the transFat of this activity |
NutritionRecord.Builder |
setUnsaturatedFat(unsaturatedFat: Mass?) Sets the unsaturatedFat of this activity |
NutritionRecord.Builder |
setVitaminA(vitaminA: Mass?) Sets the vitaminA of this activity |
NutritionRecord.Builder |
setVitaminB12(vitaminB12: Mass?) Sets the vitaminB12 of this activity |
NutritionRecord.Builder |
setVitaminB6(vitaminB6: Mass?) Sets the vitaminB6 of this activity |
NutritionRecord.Builder |
setVitaminC(vitaminC: Mass?) Sets the vitaminC of this activity |
NutritionRecord.Builder |
setVitaminD(vitaminD: Mass?) Sets the vitaminD of this activity |
NutritionRecord.Builder |
setVitaminE(vitaminE: Mass?) Sets the vitaminE of this activity |
NutritionRecord.Builder |
setVitaminK(vitaminK: Mass?) Sets the vitaminK of this activity |
NutritionRecord.Builder |
Sets the zinc of this activity |
Public constructors
Builder
Builder(
metadata: Metadata,
startTime: Instant,
endTime: Instant)
Parameters | |
---|---|
metadata |
Metadata: Metadata to be associated with the record. See Metadata . This value cannot be null . |
startTime |
Instant: Start time of this activity This value cannot be null . |
endTime |
Instant: End time of this activity This value cannot be null . |
Public methods
build
fun build(): NutritionRecord
Return | |
---|---|
NutritionRecord |
Object of NutritionRecord This value cannot be null . |
clearEndZoneOffset
fun clearEndZoneOffset(): NutritionRecord.Builder
Sets the start zone offset of this record to system default.
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
clearStartZoneOffset
fun clearStartZoneOffset(): NutritionRecord.Builder
Sets the start zone offset of this record to system default.
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setBiotin
fun setBiotin(biotin: Mass?): NutritionRecord.Builder
Sets the biotin of this activity
Parameters | |
---|---|
biotin |
Mass?: Biotin of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setCaffeine
fun setCaffeine(caffeine: Mass?): NutritionRecord.Builder
Sets the caffeine of this activity
Parameters | |
---|---|
caffeine |
Mass?: Caffeine of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setCalcium
fun setCalcium(calcium: Mass?): NutritionRecord.Builder
Sets the calcium of this activity
Parameters | |
---|---|
calcium |
Mass?: Calcium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setChloride
fun setChloride(chloride: Mass?): NutritionRecord.Builder
Sets the chloride of this activity
Parameters | |
---|---|
chloride |
Mass?: Chloride of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setCholesterol
fun setCholesterol(cholesterol: Mass?): NutritionRecord.Builder
Sets the cholesterol of this activity
Parameters | |
---|---|
cholesterol |
Mass?: Cholesterol of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setChromium
fun setChromium(chromium: Mass?): NutritionRecord.Builder
Sets the chromium of this activity
Parameters | |
---|---|
chromium |
Mass?: Chromium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setCopper
fun setCopper(copper: Mass?): NutritionRecord.Builder
Sets the copper of this activity
Parameters | |
---|---|
copper |
Mass?: Copper of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setDietaryFiber
fun setDietaryFiber(dietaryFiber: Mass?): NutritionRecord.Builder
Sets the dietaryFiber of this activity
Parameters | |
---|---|
dietaryFiber |
Mass?: DietaryFiber of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setEndZoneOffset
fun setEndZoneOffset(endZoneOffset: ZoneOffset): NutritionRecord.Builder
Sets the zone offset of the user when the activity ended
Parameters | |
---|---|
endZoneOffset |
ZoneOffset: This value cannot be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setEnergy
fun setEnergy(energy: Energy?): NutritionRecord.Builder
Sets the energy of this activity
Parameters | |
---|---|
energy |
Energy?: Energy of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setEnergyFromFat
fun setEnergyFromFat(energyFromFat: Energy?): NutritionRecord.Builder
Sets the energyFromFat of this activity
Parameters | |
---|---|
energyFromFat |
Energy?: EnergyFromFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setFolate
fun setFolate(folate: Mass?): NutritionRecord.Builder
Sets the folate of this activity
Parameters | |
---|---|
folate |
Mass?: Folate of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setFolicAcid
fun setFolicAcid(folicAcid: Mass?): NutritionRecord.Builder
Sets the folicAcid of this activity
Parameters | |
---|---|
folicAcid |
Mass?: FolicAcid of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setIodine
fun setIodine(iodine: Mass?): NutritionRecord.Builder
Sets the iodine of this activity
Parameters | |
---|---|
iodine |
Mass?: Iodine of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setIron
fun setIron(iron: Mass?): NutritionRecord.Builder
Sets the iron of this activity
Parameters | |
---|---|
iron |
Mass?: Iron of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setMagnesium
fun setMagnesium(magnesium: Mass?): NutritionRecord.Builder
Sets the magnesium of this activity
Parameters | |
---|---|
magnesium |
Mass?: Magnesium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setManganese
fun setManganese(manganese: Mass?): NutritionRecord.Builder
Sets the manganese of this activity
Parameters | |
---|---|
manganese |
Mass?: Manganese of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setMealName
fun setMealName(mealName: String): NutritionRecord.Builder
Sets the name of this activity
Parameters | |
---|---|
mealName |
String: Name of this activity This value cannot be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setMealType
fun setMealType(mealType: Int): NutritionRecord.Builder
Sets the mealType of this activity
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setMolybdenum
fun setMolybdenum(molybdenum: Mass?): NutritionRecord.Builder
Sets the molybdenum of this activity
Parameters | |
---|---|
molybdenum |
Mass?: Molybdenum of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setMonounsaturatedFat
fun setMonounsaturatedFat(monounsaturatedFat: Mass?): NutritionRecord.Builder
Sets the monounsaturatedFat of this activity
Parameters | |
---|---|
monounsaturatedFat |
Mass?: MonounsaturatedFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setNiacin
fun setNiacin(niacin: Mass?): NutritionRecord.Builder
Sets the niacin of this activity
Parameters | |
---|---|
niacin |
Mass?: Niacin of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setPantothenicAcid
fun setPantothenicAcid(pantothenicAcid: Mass?): NutritionRecord.Builder
Sets the pantothenicAcid of this activity
Parameters | |
---|---|
pantothenicAcid |
Mass?: PantothenicAcid of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setPhosphorus
fun setPhosphorus(phosphorus: Mass?): NutritionRecord.Builder
Sets the phosphorus of this activity
Parameters | |
---|---|
phosphorus |
Mass?: Phosphorus of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setPolyunsaturatedFat
fun setPolyunsaturatedFat(polyunsaturatedFat: Mass?): NutritionRecord.Builder
Sets the polyunsaturatedFat of this activity
Parameters | |
---|---|
polyunsaturatedFat |
Mass?: PolyunsaturatedFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setPotassium
fun setPotassium(potassium: Mass?): NutritionRecord.Builder
Sets the potassium of this activity
Parameters | |
---|---|
potassium |
Mass?: Potassium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setProtein
fun setProtein(protein: Mass?): NutritionRecord.Builder
Sets the protein of this activity
Parameters | |
---|---|
protein |
Mass?: Protein of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setRiboflavin
fun setRiboflavin(riboflavin: Mass?): NutritionRecord.Builder
Sets the riboflavin of this activity
Parameters | |
---|---|
riboflavin |
Mass?: Riboflavin of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setSaturatedFat
fun setSaturatedFat(saturatedFat: Mass?): NutritionRecord.Builder
Sets the saturatedFat of this activity
Parameters | |
---|---|
saturatedFat |
Mass?: SaturatedFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setSelenium
fun setSelenium(selenium: Mass?): NutritionRecord.Builder
Sets the selenium of this activity
Parameters | |
---|---|
selenium |
Mass?: Selenium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setSodium
fun setSodium(sodium: Mass?): NutritionRecord.Builder
Sets the sodium of this activity
Parameters | |
---|---|
sodium |
Mass?: Sodium of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setStartZoneOffset
fun setStartZoneOffset(startZoneOffset: ZoneOffset): NutritionRecord.Builder
Sets the zone offset of the user when the activity started
Parameters | |
---|---|
startZoneOffset |
ZoneOffset: This value cannot be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setSugar
fun setSugar(sugar: Mass?): NutritionRecord.Builder
Sets the sugar of this activity
Parameters | |
---|---|
sugar |
Mass?: Sugar of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setThiamin
fun setThiamin(thiamin: Mass?): NutritionRecord.Builder
Sets the thiamin of this activity
Parameters | |
---|---|
thiamin |
Mass?: Thiamin of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setTotalCarbohydrate
fun setTotalCarbohydrate(totalCarbohydrate: Mass?): NutritionRecord.Builder
Sets the totalCarbohydrate of this activity
Parameters | |
---|---|
totalCarbohydrate |
Mass?: TotalCarbohydrate of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setTotalFat
fun setTotalFat(totalFat: Mass?): NutritionRecord.Builder
Sets the totalFat of this activity
Parameters | |
---|---|
totalFat |
Mass?: TotalFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setTransFat
fun setTransFat(transFat: Mass?): NutritionRecord.Builder
Sets the transFat of this activity
Parameters | |
---|---|
transFat |
Mass?: TransFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setUnsaturatedFat
fun setUnsaturatedFat(unsaturatedFat: Mass?): NutritionRecord.Builder
Sets the unsaturatedFat of this activity
Parameters | |
---|---|
unsaturatedFat |
Mass?: UnsaturatedFat of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminA
fun setVitaminA(vitaminA: Mass?): NutritionRecord.Builder
Sets the vitaminA of this activity
Parameters | |
---|---|
vitaminA |
Mass?: VitaminA of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminB12
fun setVitaminB12(vitaminB12: Mass?): NutritionRecord.Builder
Sets the vitaminB12 of this activity
Parameters | |
---|---|
vitaminB12 |
Mass?: VitaminB12 of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminB6
fun setVitaminB6(vitaminB6: Mass?): NutritionRecord.Builder
Sets the vitaminB6 of this activity
Parameters | |
---|---|
vitaminB6 |
Mass?: VitaminB6 of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminC
fun setVitaminC(vitaminC: Mass?): NutritionRecord.Builder
Sets the vitaminC of this activity
Parameters | |
---|---|
vitaminC |
Mass?: VitaminC of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminD
fun setVitaminD(vitaminD: Mass?): NutritionRecord.Builder
Sets the vitaminD of this activity
Parameters | |
---|---|
vitaminD |
Mass?: VitaminD of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminE
fun setVitaminE(vitaminE: Mass?): NutritionRecord.Builder
Sets the vitaminE of this activity
Parameters | |
---|---|
vitaminE |
Mass?: VitaminE of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setVitaminK
fun setVitaminK(vitaminK: Mass?): NutritionRecord.Builder
Sets the vitaminK of this activity
Parameters | |
---|---|
vitaminK |
Mass?: VitaminK of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |
setZinc
fun setZinc(zinc: Mass?): NutritionRecord.Builder
Sets the zinc of this activity
Parameters | |
---|---|
zinc |
Mass?: Zinc of this activity This value may be null . |
Return | |
---|---|
NutritionRecord.Builder |
This value cannot be null . |