scheduler.model
Class Dose

java.lang.Object
  extended by scheduler.model.Dose

public class Dose
extends java.lang.Object

Describes an amount of a particular medication to be taken at a time specified by the containing bin.


Constructor Summary
Dose(Medication medication)
          Creates a new Dose instance for the specified medication with the amount initiated to zero.
 
Method Summary
 double getAmount()
          Returns the amount of medication associated with this dose.
 Medication getMedication()
          Returns the medication associated with this dose.
 void setAmount(double amount)
          Sets the dose amount to the specified argument with 1/10 accuracy.
 void setMedication(Medication medication)
          Sets the medication corresponding to this dose to the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dose

public Dose(Medication medication)
Creates a new Dose instance for the specified medication with the amount initiated to zero.

Parameters:
medication - the Medication to be associated with this dose specifically
Method Detail

setMedication

public void setMedication(Medication medication)
Sets the medication corresponding to this dose to the argument.

Parameters:
medication - the new medication to associate with this dose

setAmount

public void setAmount(double amount)
Sets the dose amount to the specified argument with 1/10 accuracy. Smaller dose denominations than tenths would be unreasonable.

Parameters:
amount - the amount of medication for this dose

getMedication

public Medication getMedication()
Returns the medication associated with this dose.

Returns:
the medication for this dose

getAmount

public double getAmount()
Returns the amount of medication associated with this dose.

Returns:
the amount for this dose