1
2
3
4 package ca.spaz.cron.database;
5
6
7 public class Minerals extends NutrientTable {
8 public double calcium;
9
10 public double copper;
11
12 public double iron;
13
14 public double magnesium;
15
16 public double manganese;
17
18 public double phosphorus;
19
20 public double potassium;
21
22 public double selenium;
23
24 public double sodium;
25
26 public double zinc;
27
28 public Minerals() {
29 }
30
31 public Minerals(Food f) {
32 super(f);
33 }
34
35 public void addFood(Serving food) {
36 double weight = food.getGrams() / 100.0;
37 super.addFood(food.getFood().getMinerals(), weight);
38 }
39
40
41
42
43
44
45 protected String doGetTableName() {
46 return "minerals";
47 }
48
49 }