Record Class DrugInteractionChecker.DrugInteraction
java.lang.Object
java.lang.Record
org.episteme.natural.medicine.pharmacology.DrugInteractionChecker.DrugInteraction
- Enclosing class:
DrugInteractionChecker
public static record DrugInteractionChecker.DrugInteraction(DrugInteractionChecker.Drug drug1, DrugInteractionChecker.Drug drug2, DrugInteractionChecker.InteractionSeverity severity, DrugInteractionChecker.InteractionMechanism mechanism, String description, String recommendation)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDrugInteraction(DrugInteractionChecker.Drug drug1, DrugInteractionChecker.Drug drug2, DrugInteractionChecker.InteractionSeverity severity, DrugInteractionChecker.InteractionMechanism mechanism, String description, String recommendation) Creates an instance of aDrugInteractionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.drug1()Returns the value of thedrug1record component.drug2()Returns the value of thedrug2record component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themechanismrecord component.Returns the value of therecommendationrecord component.severity()Returns the value of theseverityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DrugInteraction
public DrugInteraction(DrugInteractionChecker.Drug drug1, DrugInteractionChecker.Drug drug2, DrugInteractionChecker.InteractionSeverity severity, DrugInteractionChecker.InteractionMechanism mechanism, String description, String recommendation) Creates an instance of aDrugInteractionrecord class.- Parameters:
drug1- the value for thedrug1record componentdrug2- the value for thedrug2record componentseverity- the value for theseverityrecord componentmechanism- the value for themechanismrecord componentdescription- the value for thedescriptionrecord componentrecommendation- the value for therecommendationrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
drug1
Returns the value of thedrug1record component.- Returns:
- the value of the
drug1record component
-
drug2
Returns the value of thedrug2record component.- Returns:
- the value of the
drug2record component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
mechanism
Returns the value of themechanismrecord component.- Returns:
- the value of the
mechanismrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
recommendation
Returns the value of therecommendationrecord component.- Returns:
- the value of the
recommendationrecord component
-