|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.spaz.cron.database.Measure
public class Measure
A measure maps a common measure for a food item (ie: a Cup, Teaspoon, Serving, etc...) The Measure contains the description of the measure and the number of grams of the food there are in the given measure.
Field Summary | |
---|---|
static Measure |
GRAM
|
Constructor Summary | |
---|---|
Measure()
|
|
Measure(double amount,
java.lang.String description,
double grams)
Contruct a measure manually |
Method Summary | |
---|---|
double |
getAmount()
Get the standard amount of this measure. |
java.lang.String |
getDescription()
Get the english name of the measure type |
int |
getFoodID()
|
double |
getGrams()
Get the number of grams in this measure |
int |
getID()
|
void |
setAmount(double amount)
Set the standard amount of this measure |
void |
setDescription(java.lang.String description)
Set the english name of this measure type |
void |
setFoodID(int fid)
|
void |
setGrams(double grams)
Set the number of grams in this measure |
void |
setID(int id)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Measure GRAM
Constructor Detail |
---|
public Measure()
public Measure(double amount, java.lang.String description, double grams)
amount
- the multiplier of the measure (ex: 0.5)description
- the measure name (ex: Cups)grams
- the number of grams in the multiple of this type (ex: grams in
1/2 a Cup)Method Detail |
---|
public double getAmount()
public void setAmount(double amount)
amount
- a multiplierpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
public double getGrams()
public void setGrams(double grams)
public java.lang.String toString()
toString
in class java.lang.Object
public int getID()
public void setID(int id)
public int getFoodID()
public void setFoodID(int fid)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |