Class Pathology
java.lang.Object
org.episteme.natural.medicine.Pathology
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named
- Direct Known Subclasses:
Disease, Impairment
Common ancestor for all medicine-related troubles (diseases, allergies, etc.).
Implements ComprehensiveIdentification to support dynamic traits and consistent identity.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new Pathology with a specific name and random ID.protectedPathology(Identification id, String name) Internal constructor for subclasses specifying ID. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMedication(Medication medication) booleangetCause()getId()Returns the unique identifier of this entity.Returns the set of medications associated with this pathology.Returns the traits map for this entity.inthashCode()voidremoveMedication(Medication medication) voidvoidsetDescription(String description) toString()Methods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Field Details
-
id
-
traits
-
-
Constructor Details
-
Pathology
Creates a new Pathology with a specific name and random ID.- Parameters:
name- the scientific name- Throws:
NullPointerException- if name is null
-
Pathology
Internal constructor for subclasses specifying ID.
-
-
Method Details
-
getId
Description copied from interface:IdentifiedReturns the unique identifier of this entity.- Specified by:
getIdin interfaceIdentified<Identification>- Returns:
- the identifier
-
getTraits
Description copied from interface:ComprehensiveIdentificationReturns the traits map for this entity.- Specified by:
getTraitsin interfaceCommented- Specified by:
getTraitsin interfaceComprehensiveIdentification- Returns:
- the traits map
-
getDescription
-
setDescription
-
getCause
-
setCause
-
getMedications
Returns the set of medications associated with this pathology.- Returns:
- an unmodifiable set of medications
-
addMedication
-
removeMedication
-
equals
-
hashCode
-
toString
-