java.lang.Object
com.wellnessapp.model.mood.MoodEntry
- All Implemented Interfaces:
IMoodEntry
-
Constructor Summary
ConstructorsConstructorDescriptionMoodEntry(com.wellnessapp.enums.MoodType mood) Constructs a mood entry with only the mood specified, using the current time as the timestamp and no comment.MoodEntry(com.wellnessapp.enums.MoodType mood, LocalDateTime timestamp, String comment) Represents an entry in the mood log with various constructors for different use cases. -
Method Summary
Modifier and TypeMethodDescriptionintgetId()com.wellnessapp.enums.MoodTypegetMood()voidsetComment(String comment) voidsetId(int id) voidsetMood(com.wellnessapp.enums.MoodType value) voidsetTimestamp(LocalDateTime timestamp)
-
Constructor Details
-
MoodEntry
Represents an entry in the mood log with various constructors for different use cases. Each mood entry records the user's mood at a specific time along with optional comments.- Parameters:
mood- The mood recorded in this entry. Should be one of the enumMoodType.timestamp- (*) The date and time when the mood changed. This parameter is optional and defaults to the current system time if not specified.comment- (*) Additional text provided by the user about their mood at the time of the entry. This parameter is optional and defaults to an empty string if not specified.
-
MoodEntry
public MoodEntry(com.wellnessapp.enums.MoodType mood) Constructs a mood entry with only the mood specified, using the current time as the timestamp and no comment.- Parameters:
mood- The mood recorded in this entry.- See Also:
-
-
Method Details
-
getId
public int getId()- Specified by:
getIdin interfaceIMoodEntry
-
setId
public void setId(int id) - Specified by:
setIdin interfaceIMoodEntry
-
getTimestamp
- Specified by:
getTimestampin interfaceIMoodEntry
-
setTimestamp
- Specified by:
setTimestampin interfaceIMoodEntry
-
getMood
public com.wellnessapp.enums.MoodType getMood()- Specified by:
getMoodin interfaceIMoodEntry
-
setMood
public void setMood(com.wellnessapp.enums.MoodType value) - Specified by:
setMoodin interfaceIMoodEntry
-
getComment
- Specified by:
getCommentin interfaceIMoodEntry
-
setComment
- Specified by:
setCommentin interfaceIMoodEntry
-