Package com.example.cardiotracker
Class info
java.lang.Object
com.example.cardiotracker.info
The `info` class represents information related to health data.
It encapsulates the comment, diastolic pressure, heart rate, systolic pressure,
system date, and system time of the health data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addUserData
(info data) Adds user data to the `info` object.int
count()
Returns the number of user data entries in the `info` object.void
deleteUserData
(info data) Deletes the specified user data from the `info` object.Returns the comment related to the health data.getData()
Returns the list of user data stored in the `info` object.Returns the diastolic pressure value.Returns the heart rate value.Returns the systolic pressure value.Returns the system date when the data was recorded.Returns the system time when the data was recorded.
-
Field Details
-
comment
-
diaPressure
-
heartRate
-
sysPressure
-
systemDate
-
systemTime
-
info_list
-
-
Constructor Details
-
info
public info()Default constructor required for Firebase. -
info
public info(String comment, String diaPressure, String heartRate, String sysPressure, String systemDate, String systemTime) Constructs an `info` object with the specified information.- Parameters:
comment
- the comment related to the health datadiaPressure
- the diastolic pressure valueheartRate
- the heart rate valuesysPressure
- the systolic pressure valuesystemDate
- the system date when the data was recordedsystemTime
- the system time when the data was recorded
-
-
Method Details
-
getComment
Returns the comment related to the health data.- Returns:
- the comment
-
getDiaPressure
Returns the diastolic pressure value.- Returns:
- the diastolic pressure
-
getHeartRate
Returns the heart rate value.- Returns:
- the heart rate
-
getSysPressure
Returns the systolic pressure value.- Returns:
- the systolic pressure
-
getSystemDate
Returns the system date when the data was recorded.- Returns:
- the system date
-
getSystemTime
Returns the system time when the data was recorded.- Returns:
- the system time
-
addUserData
Adds user data to the `info` object.- Parameters:
data
- the user data to add- Throws:
IllegalArgumentException
- if the data is already present in the `info` object
-
count
public int count()Returns the number of user data entries in the `info` object.- Returns:
- the count of user data entries
-
getData
Returns the list of user data stored in the `info` object.- Returns:
- the list of user data
-
deleteUserData
Deletes the specified user data from the `info` object.- Parameters:
data
- the user data to delete- Throws:
IllegalArgumentException
- if the data does not exist in the `info` object
-