NutritionRecord.Builder
public
static
final
class
NutritionRecord.Builder
extends Object
Builder class for NutritionRecord
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
public Builder (Metadata metadata,
Instant startTime,
Instant endTime)
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
clearEndZoneOffset
public NutritionRecord.Builder clearEndZoneOffset ()
Sets the start zone offset of this record to system default.
clearStartZoneOffset
public NutritionRecord.Builder clearStartZoneOffset ()
Sets the start zone offset of this record to system default.
setBiotin
public NutritionRecord.Builder setBiotin (Mass biotin)
Sets the biotin of this activity
Parameters |
biotin |
Mass : Biotin of this activity
This value may be null . |
setCaffeine
public NutritionRecord.Builder setCaffeine (Mass caffeine)
Sets the caffeine of this activity
Parameters |
caffeine |
Mass : Caffeine of this activity
This value may be null . |
setCalcium
public NutritionRecord.Builder setCalcium (Mass calcium)
Sets the calcium of this activity
Parameters |
calcium |
Mass : Calcium of this activity
This value may be null . |
setChloride
public NutritionRecord.Builder setChloride (Mass chloride)
Sets the chloride of this activity
Parameters |
chloride |
Mass : Chloride of this activity
This value may be null . |
setCholesterol
public NutritionRecord.Builder setCholesterol (Mass cholesterol)
Sets the cholesterol of this activity
Parameters |
cholesterol |
Mass : Cholesterol of this activity
This value may be null . |
setChromium
public NutritionRecord.Builder setChromium (Mass chromium)
Sets the chromium of this activity
Parameters |
chromium |
Mass : Chromium of this activity
This value may be null . |
setCopper
public NutritionRecord.Builder setCopper (Mass copper)
Sets the copper of this activity
Parameters |
copper |
Mass : Copper of this activity
This value may be null . |
setDietaryFiber
public NutritionRecord.Builder setDietaryFiber (Mass dietaryFiber)
Sets the dietaryFiber of this activity
Parameters |
dietaryFiber |
Mass : DietaryFiber of this activity
This value may be null . |
setEndZoneOffset
public NutritionRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)
Sets the zone offset of the user when the activity ended
Parameters |
endZoneOffset |
ZoneOffset : This value cannot be null . |
setEnergy
public NutritionRecord.Builder setEnergy (Energy energy)
Sets the energy of this activity
Parameters |
energy |
Energy : Energy of this activity
This value may be null . |
setEnergyFromFat
public NutritionRecord.Builder setEnergyFromFat (Energy energyFromFat)
Sets the energyFromFat of this activity
Parameters |
energyFromFat |
Energy : EnergyFromFat of this activity
This value may be null . |
setFolate
public NutritionRecord.Builder setFolate (Mass folate)
Sets the folate of this activity
Parameters |
folate |
Mass : Folate of this activity
This value may be null . |
setFolicAcid
public NutritionRecord.Builder setFolicAcid (Mass folicAcid)
Sets the folicAcid of this activity
Parameters |
folicAcid |
Mass : FolicAcid of this activity
This value may be null . |
setIodine
public NutritionRecord.Builder setIodine (Mass iodine)
Sets the iodine of this activity
Parameters |
iodine |
Mass : Iodine of this activity
This value may be null . |
setIron
public NutritionRecord.Builder setIron (Mass iron)
Sets the iron of this activity
Parameters |
iron |
Mass : Iron of this activity
This value may be null . |
setMagnesium
public NutritionRecord.Builder setMagnesium (Mass magnesium)
Sets the magnesium of this activity
Parameters |
magnesium |
Mass : Magnesium of this activity
This value may be null . |
setManganese
public NutritionRecord.Builder setManganese (Mass manganese)
Sets the manganese of this activity
Parameters |
manganese |
Mass : Manganese of this activity
This value may be null . |
setMealName
public NutritionRecord.Builder setMealName (String mealName)
Sets the name of this activity
Parameters |
mealName |
String : Name of this activity
This value cannot be null . |
setMolybdenum
public NutritionRecord.Builder setMolybdenum (Mass molybdenum)
Sets the molybdenum of this activity
Parameters |
molybdenum |
Mass : Molybdenum of this activity
This value may be null . |
setMonounsaturatedFat
public NutritionRecord.Builder setMonounsaturatedFat (Mass monounsaturatedFat)
Sets the monounsaturatedFat of this activity
Parameters |
monounsaturatedFat |
Mass : MonounsaturatedFat of this activity
This value may be null . |
setNiacin
public NutritionRecord.Builder setNiacin (Mass niacin)
Sets the niacin of this activity
Parameters |
niacin |
Mass : Niacin of this activity
This value may be null . |
setPantothenicAcid
public NutritionRecord.Builder setPantothenicAcid (Mass pantothenicAcid)
Sets the pantothenicAcid of this activity
Parameters |
pantothenicAcid |
Mass : PantothenicAcid of this activity
This value may be null . |
setPhosphorus
public NutritionRecord.Builder setPhosphorus (Mass phosphorus)
Sets the phosphorus of this activity
Parameters |
phosphorus |
Mass : Phosphorus of this activity
This value may be null . |
setPolyunsaturatedFat
public NutritionRecord.Builder setPolyunsaturatedFat (Mass polyunsaturatedFat)
Sets the polyunsaturatedFat of this activity
Parameters |
polyunsaturatedFat |
Mass : PolyunsaturatedFat of this activity
This value may be null . |
setPotassium
public NutritionRecord.Builder setPotassium (Mass potassium)
Sets the potassium of this activity
Parameters |
potassium |
Mass : Potassium of this activity
This value may be null . |
setProtein
public NutritionRecord.Builder setProtein (Mass protein)
Sets the protein of this activity
Parameters |
protein |
Mass : Protein of this activity
This value may be null . |
setRiboflavin
public NutritionRecord.Builder setRiboflavin (Mass riboflavin)
Sets the riboflavin of this activity
Parameters |
riboflavin |
Mass : Riboflavin of this activity
This value may be null . |
setSaturatedFat
public NutritionRecord.Builder setSaturatedFat (Mass saturatedFat)
Sets the saturatedFat of this activity
Parameters |
saturatedFat |
Mass : SaturatedFat of this activity
This value may be null . |
setSelenium
public NutritionRecord.Builder setSelenium (Mass selenium)
Sets the selenium of this activity
Parameters |
selenium |
Mass : Selenium of this activity
This value may be null . |
setSodium
public NutritionRecord.Builder setSodium (Mass sodium)
Sets the sodium of this activity
Parameters |
sodium |
Mass : Sodium of this activity
This value may be null . |
setStartZoneOffset
public NutritionRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)
Sets the zone offset of the user when the activity started
Parameters |
startZoneOffset |
ZoneOffset : This value cannot be null . |
setSugar
public NutritionRecord.Builder setSugar (Mass sugar)
Sets the sugar of this activity
Parameters |
sugar |
Mass : Sugar of this activity
This value may be null . |
setThiamin
public NutritionRecord.Builder setThiamin (Mass thiamin)
Sets the thiamin of this activity
Parameters |
thiamin |
Mass : Thiamin of this activity
This value may be null . |
setTotalCarbohydrate
public NutritionRecord.Builder setTotalCarbohydrate (Mass totalCarbohydrate)
Sets the totalCarbohydrate of this activity
Parameters |
totalCarbohydrate |
Mass : TotalCarbohydrate of this activity
This value may be null . |
setTotalFat
public NutritionRecord.Builder setTotalFat (Mass totalFat)
Sets the totalFat of this activity
Parameters |
totalFat |
Mass : TotalFat of this activity
This value may be null . |
setTransFat
public NutritionRecord.Builder setTransFat (Mass transFat)
Sets the transFat of this activity
Parameters |
transFat |
Mass : TransFat of this activity
This value may be null . |
setUnsaturatedFat
public NutritionRecord.Builder setUnsaturatedFat (Mass unsaturatedFat)
Sets the unsaturatedFat of this activity
Parameters |
unsaturatedFat |
Mass : UnsaturatedFat of this activity
This value may be null . |
setVitaminA
public NutritionRecord.Builder setVitaminA (Mass vitaminA)
Sets the vitaminA of this activity
Parameters |
vitaminA |
Mass : VitaminA of this activity
This value may be null . |
setVitaminB12
public NutritionRecord.Builder setVitaminB12 (Mass vitaminB12)
Sets the vitaminB12 of this activity
Parameters |
vitaminB12 |
Mass : VitaminB12 of this activity
This value may be null . |
setVitaminB6
public NutritionRecord.Builder setVitaminB6 (Mass vitaminB6)
Sets the vitaminB6 of this activity
Parameters |
vitaminB6 |
Mass : VitaminB6 of this activity
This value may be null . |
setVitaminC
public NutritionRecord.Builder setVitaminC (Mass vitaminC)
Sets the vitaminC of this activity
Parameters |
vitaminC |
Mass : VitaminC of this activity
This value may be null . |
setVitaminD
public NutritionRecord.Builder setVitaminD (Mass vitaminD)
Sets the vitaminD of this activity
Parameters |
vitaminD |
Mass : VitaminD of this activity
This value may be null . |
setVitaminE
public NutritionRecord.Builder setVitaminE (Mass vitaminE)
Sets the vitaminE of this activity
Parameters |
vitaminE |
Mass : VitaminE of this activity
This value may be null . |
setVitaminK
public NutritionRecord.Builder setVitaminK (Mass vitaminK)
Sets the vitaminK of this activity
Parameters |
vitaminK |
Mass : VitaminK of this activity
This value may be null . |
setZinc
public NutritionRecord.Builder setZinc (Mass zinc)
Sets the zinc of this activity
Parameters |
zinc |
Mass : Zinc of this activity
This value may be null . |