Order Klasse gefüllt, sowie readOrder Datentypen angepasst
This commit is contained in:
parent
12a8806fb6
commit
19d36d3464
@ -177,7 +177,7 @@ public class Data {
|
||||
*/
|
||||
public ArrayList<Order> readOrder() {
|
||||
|
||||
ArrayList<String> orderList = new ArrayList<>();
|
||||
ArrayList<Order> orderList = new ArrayList<>();
|
||||
List<String> rows = getRows();
|
||||
|
||||
for (String row : rows) {
|
||||
@ -185,17 +185,17 @@ public class Data {
|
||||
|
||||
String date = parts[0];
|
||||
String meat = parts[1];
|
||||
String meatCount = parts[2];
|
||||
int meatCount = Integer.parseInt(parts[2]);
|
||||
String vegi = parts[3];
|
||||
String vegiCount = parts[4];
|
||||
int vegiCount = Integer.parseInt(parts[4]);
|
||||
String vegan = parts[5];
|
||||
String veganCount = parts[6];
|
||||
int veganCount = Integer.parseInt(parts[6]);
|
||||
String desertV = parts[7];
|
||||
String desertVCount = parts[8];
|
||||
int desertVCount = Integer.parseInt(parts[8]);
|
||||
String desert = parts[9];
|
||||
String desertCount = parts[10];
|
||||
//orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV,
|
||||
// desertVCount, desert, desertCount))
|
||||
int desertCount = Integer.parseInt(parts[10]);
|
||||
orderList.add(new Order(date, meat, meatCount,vegi, vegiCount, vegan, veganCount, desertV,
|
||||
desertVCount, desert, desertCount));
|
||||
}
|
||||
return null;//orderList
|
||||
|
||||
|
@ -1,2 +1,29 @@
|
||||
public class Order {
|
||||
String date;
|
||||
String meat;
|
||||
int meatCount;
|
||||
String vegi;
|
||||
int vegiCount;
|
||||
String vegan;
|
||||
int veganCount;
|
||||
String desertV;
|
||||
int desertVCount;
|
||||
String desert;
|
||||
int desertCount;
|
||||
|
||||
Order (String date, String meat, int meatCount, String vegi, int vegiCount, String vegan, int veganCount,
|
||||
String desertV, int desertVCount, String desert, int desertCount)
|
||||
{
|
||||
this.date = date;
|
||||
this.meat = meat;
|
||||
this.meatCount = meatCount;
|
||||
this.vegi = vegi;
|
||||
this.vegiCount = vegiCount;
|
||||
this.vegan = vegan;
|
||||
this.veganCount = veganCount;
|
||||
this.desertV = desertV;
|
||||
this.desertVCount = desertVCount;
|
||||
this.desert = desert;
|
||||
this.desertCount = desertCount;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user