metab
Class Intestine

java.lang.Object
  extended bymetab.Intestine
All Implemented Interfaces:
java.io.Serializable

public class Intestine
extends java.lang.Object
implements java.io.Serializable

The Intestine class simulates the Small Intestine compartment in the Compartmental model. The only actual job that the small intestine accomplishes in relation to the metabolism of ethanol is transport the ethanol from the small intestine to the blood via the villi contained in the intestinal wall. No ethanol is actually metabolized in the small intestine, but it is instead a factor that just delays transport to the LeanBodyMass. The user must handle the transport of the ethanol and liquid between other compartments by using the addLiquid and addContents methods for each compartment. To implement, all that is required is the amount of ethanol (g), and the total liquid volume (L). An optional extra description (label) may be included, but is not required for the class to function properly.

Version:
1.19
Author:
Levi Blackstone, Matthew Woller
See Also:
Stomach, LeanBodyMass, NMSubject, Serialized Form

Field Summary
private  double amount
          Amount of ethanol (g).
private static double ki
          Ethanol transport rate constant from intestine to lean body mass (L/min).
private  java.lang.String label
          Optional label for Compartment.
private  double liquid
          Amount of total liquid in the small intestine (L).
 
Constructor Summary
(package private) Intestine(double amount, double liquid)
          Constructor for intestine compartment.
(package private) Intestine(double amount, double liquid, java.lang.String label)
          Constructor for intestine compartment.
 
Method Summary
 void addContents(double newContents)
          Adds ethanol to the intestine compartment (can be a negative value).
 void addLiquid(double newLiquid)
          Adds liquid from the beverage(s) and gastric fluid.
 void clear()
          Resets compartment.
 double computeEthanolAbsorption()
          Computes amount of ethanol being absorbed into lean body mass.
 double getContents()
          Retrieves amount of ethanol remaining in intestine.
 java.lang.String getLabel()
          Retrieves the optional label.
 double getLiquid()
          Retrieves amount of liquid remaining in intestine.
 boolean isEmpty()
          Checks to see if any ethanol remains in intestine.
 void setLabel(java.lang.String newLabel)
          Sets optional label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ki

private static final double ki
Ethanol transport rate constant from intestine to lean body mass (L/min).

See Also:
Constant Field Values

amount

private double amount
Amount of ethanol (g).


liquid

private double liquid
Amount of total liquid in the small intestine (L).


label

private java.lang.String label
Optional label for Compartment.

Constructor Detail

Intestine

Intestine(double amount,
          double liquid)
Constructor for intestine compartment.

Parameters:
amount - Amount of ethanol (g).
liquid - Amount of liquid including beverages and gastric fluid (L).
See Also:
Intestine(double , double , String)

Intestine

Intestine(double amount,
          double liquid,
          java.lang.String label)
Constructor for intestine compartment.

Parameters:
amount - Amount of ethanol (g).
liquid - Amount of liquid including beverages and gastric fluid (L).
label - Optional description for compartment.
See Also:
Intestine(double , double)
Method Detail

addContents

public void addContents(double newContents)
Adds ethanol to the intestine compartment (can be a negative value).

Parameters:
newContents - Amount of ethanol being transfered (g).

addLiquid

public void addLiquid(double newLiquid)
Adds liquid from the beverage(s) and gastric fluid.

Parameters:
newLiquid - Amount of liquid being transfered (L).

clear

public void clear()
Resets compartment.


getContents

public double getContents()
Retrieves amount of ethanol remaining in intestine.

Returns:
double representing amount of ethanol (g).

getLabel

public java.lang.String getLabel()
Retrieves the optional label.

Returns:
String representing label.

getLiquid

public double getLiquid()
Retrieves amount of liquid remaining in intestine.

Returns:
double representing amount of liquid (L).

isEmpty

public boolean isEmpty()
Checks to see if any ethanol remains in intestine.

Returns:
boolean specifying if intestine is empty.

computeEthanolAbsorption

public double computeEthanolAbsorption()
Computes amount of ethanol being absorbed into lean body mass.

Returns:
double representing rate of absorption (g/min).

setLabel

public void setLabel(java.lang.String newLabel)
Sets optional label.

Parameters:
newLabel - String representing new label.