Wieso macht das remove nicht einfach ein neues? Ich bekomme immer autos.size() = 1 ??
Versteh ich nicht...
Versteh ich nicht...
Code:
public void load(String pfad,int i){
//Einlesen der XLS Datei mit Blatt nr
try {
Workbook workbook = Workbook.getWorkbook(new File(pfad));
this.sheet=workbook.getSheet(i);
} catch (Exception e) {}
int nr=3;
Cell zelle=null;
boolean run=true;
Vector<Auto> autos=new Vector<Auto>();
while(run){
try {zelle=sheet.getCell(2,nr);}
catch (Exception e) {break;}
autos.add(getauto(nr));
System.out.println(autos.size());
if(!zelle.getContents().equals(sheet.getCell(0,nr-1).getContents())){
autolist.add(new Autolist(autos));
// autos.removeAllElements(); <???
}
nr++;
}
}