Class info

java.lang.Object
com.example.cardiotracker.info

public class info extends Object
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 Details

    • comment

      private String comment
    • diaPressure

      private String diaPressure
    • heartRate

      private String heartRate
    • sysPressure

      private String sysPressure
    • systemDate

      private String systemDate
    • systemTime

      private String systemTime
    • info_list

      private List<info> 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 data
      diaPressure - the diastolic pressure value
      heartRate - the heart rate value
      sysPressure - the systolic pressure value
      systemDate - the system date when the data was recorded
      systemTime - the system time when the data was recorded
  • Method Details

    • getComment

      public String getComment()
      Returns the comment related to the health data.
      Returns:
      the comment
    • getDiaPressure

      public String getDiaPressure()
      Returns the diastolic pressure value.
      Returns:
      the diastolic pressure
    • getHeartRate

      public String getHeartRate()
      Returns the heart rate value.
      Returns:
      the heart rate
    • getSysPressure

      public String getSysPressure()
      Returns the systolic pressure value.
      Returns:
      the systolic pressure
    • getSystemDate

      public String getSystemDate()
      Returns the system date when the data was recorded.
      Returns:
      the system date
    • getSystemTime

      public String getSystemTime()
      Returns the system time when the data was recorded.
      Returns:
      the system time
    • addUserData

      public void addUserData(info data)
      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

      public List<info> getData()
      Returns the list of user data stored in the `info` object.
      Returns:
      the list of user data
    • deleteUserData

      public void deleteUserData(info data)
      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