Class Doctor

All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Temporal<TimeCoordinate>

public class Doctor extends Worker
The Doctor class provides some useful information for people whose job is to cure individuals.
Version:
1.0
Author:
Silvere Martin-Michiellot
See Also:
  • Constructor Details

    • Doctor

      public Doctor(Individual individual, MedicalSituation medicalSituation, String function, Organization organization)
      Initializes a new Doctor instance with a specific medical function.
      Parameters:
      individual - the underlying human individual
      medicalSituation - the medical context (situation) the doctor is involved in
      function - the specific title or function of the doctor
      organization - the medical organization (hospital, clinic, etc.) they work for
      Throws:
      NullPointerException - if any required argument is null
    • Doctor

      public Doctor(Individual individual, MedicalSituation medicalSituation, Organization organization)
      Initializes a new Doctor instance with the default function "Doctor".
      Parameters:
      individual - the underlying human individual
      medicalSituation - the medical context (situation)
      organization - the medical organization they work for
      Throws:
      NullPointerException - if any required argument is null
  • Method Details

    • getPatients

      public Set<Patient> getPatients()
      Returns the set of patients under this doctor's care.
      Returns:
      an unmodifiable view of the patient set
    • setPatients

      public void setPatients(Set<Patient> patients)
      Replaces the current set of patients. Each element must be a Patient instance.
      Parameters:
      patients - the new set of patients
      Throws:
      NullPointerException - if the input set is null
    • addPatient

      public void addPatient(Patient patient)
      Adds a patient to this doctor's care.
      Parameters:
      patient - the patient to add
      Throws:
      NullPointerException - if the patient is null
    • removePatient

      public void removePatient(Patient patient)
      Removes a patient from this doctor's care.
      Parameters:
      patient - the patient to remove