Package com.example.demo.calorie
Class CalorieLog
java.lang.Object
com.example.demo.calorie.CalorieLog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the total caloric count.intgetCarbs()Retrieves the amount of carbohydrates in grams.intgetFat()Retrieves the amount of fat in grams.Retrieves the date of this log entry.Retrieves the type of meal logged.intRetrieves the amount of protein in grams.getUser()Retrieves the user associated with this calorie log.voidsetCalories(int calories) Sets the total caloric count.voidsetCarbs(int carbs) Sets the amount of carbohydrates in grams.voidsetFat(int fat) Sets the amount of fat in grams.voidsetLogDate(LocalDate logDate) Sets the date of this log entry.voidsetMealType(String mealType) Sets the type of meal logged.voidsetProtein(int protein) Sets the amount of protein in grams.voidSets the user associated with this calorie log.
-
Constructor Details
-
CalorieLog
public CalorieLog()
-
-
Method Details
-
getUser
-
setUser
-
getLogDate
-
setLogDate
Sets the date of this log entry.- Parameters:
logDate- The log date to set.
-
getMealType
-
setMealType
Sets the type of meal logged.- Parameters:
mealType- The meal type string to set.
-
getCalories
public int getCalories()Retrieves the total caloric count.- Returns:
- The calorie count.
-
setCalories
public void setCalories(int calories) Sets the total caloric count.- Parameters:
calories- The calorie count to set.
-
getProtein
public int getProtein()Retrieves the amount of protein in grams.- Returns:
- The protein amount.
-
setProtein
public void setProtein(int protein) Sets the amount of protein in grams.- Parameters:
protein- The protein amount to set.
-
getFat
public int getFat()Retrieves the amount of fat in grams.- Returns:
- The fat amount.
-
setFat
public void setFat(int fat) Sets the amount of fat in grams.- Parameters:
fat- The fat amount to set.
-
getCarbs
public int getCarbs()Retrieves the amount of carbohydrates in grams.- Returns:
- The carbohydrate amount.
-
setCarbs
public void setCarbs(int carbs) Sets the amount of carbohydrates in grams.- Parameters:
carbs- The carbohydrate amount to set.
-