%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
ca.spaz.cron.database.Vitamins |
|
|
1 | /* |
|
2 | * Created on 20-Mar-2005 |
|
3 | */ |
|
4 | package ca.spaz.cron.database; |
|
5 | ||
6 | /** |
|
7 | * The standard list of vitamins for a food item. |
|
8 | * |
|
9 | * @todo: Is this list either (a) not comprehensive enough, or (b) overkill? |
|
10 | * |
|
11 | * I want to track as few items as possiblee, but do not want to leave out |
|
12 | * anything important. |
|
13 | * |
|
14 | * Also, any help on how to classify these items would be nice. |
|
15 | * |
|
16 | * @author davidson |
|
17 | */ |
|
18 | public class Vitamins extends NutrientTable { |
|
19 | ||
20 | public double vit_a; |
|
21 | public double retinol; |
|
22 | public double alpha_carotene; |
|
23 | public double beta_carotene; |
|
24 | public double beta_cryptoxanthin; |
|
25 | public double lycopene; |
|
26 | public double lutein; |
|
27 | public double vit_b6; |
|
28 | public double vit_b12; |
|
29 | public double vit_c; |
|
30 | public double vit_d; |
|
31 | public double vit_e; |
|
32 | public double beta_tocopherol; |
|
33 | public double delta_tocopherol; |
|
34 | public double gamma_tocopherol; |
|
35 | public double vit_k; |
|
36 | public double thiamin; |
|
37 | public double riboflavin; |
|
38 | public double niacin; |
|
39 | public double panto_acid; |
|
40 | public double folate; |
|
41 | ||
42 | ||
43 | 0 | public Vitamins() { |
44 | 0 | } |
45 | ||
46 | public Vitamins(Food f) { |
|
47 | 0 | super(f); |
48 | 0 | } |
49 | ||
50 | public void addFood(Serving food) { |
|
51 | 0 | double weight = food.getGrams() / 100.0; |
52 | 0 | addFood(food.getFood().getVitamins(), weight); |
53 | 0 | } |
54 | ||
55 | /* (non-Javadoc) |
|
56 | * @see ca.spaz.cron.database.NutrientTable#doGetTableName() |
|
57 | */ |
|
58 | protected String doGetTableName() { |
|
59 | 0 | return "vitamins"; |
60 | } |
|
61 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |