2020-07-28 17:38:34 +02:00
|
|
|
package com.plannaplan.models;
|
|
|
|
|
2020-09-21 17:45:52 +02:00
|
|
|
import java.util.HashMap;
|
2020-07-28 17:38:34 +02:00
|
|
|
import java.util.Iterator;
|
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
|
|
|
|
|
public class FileData {
|
|
|
|
|
2020-09-21 17:45:52 +02:00
|
|
|
private HashMap<String, Integer> keys;
|
2020-07-28 17:38:34 +02:00
|
|
|
private Iterator<Row> rows;
|
|
|
|
|
2020-09-21 17:45:52 +02:00
|
|
|
public FileData(HashMap<String, Integer> keys, Iterator<Row> rows) {
|
|
|
|
this.keys = keys;
|
|
|
|
this.rows = rows;
|
2020-07-28 17:38:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Iterator<Row> getRows() {
|
|
|
|
return rows;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setRows(Iterator<Row> rows) {
|
|
|
|
this.rows = rows;
|
|
|
|
}
|
|
|
|
|
2020-09-21 17:45:52 +02:00
|
|
|
public HashMap<String, Integer> getKeys() {
|
2020-07-28 17:38:34 +02:00
|
|
|
return keys;
|
|
|
|
}
|
|
|
|
|
2020-09-21 17:45:52 +02:00
|
|
|
public void setKeys(HashMap<String, Integer> keys) {
|
2020-07-28 17:38:34 +02:00
|
|
|
this.keys = keys;
|
|
|
|
}
|
|
|
|
|
2020-07-28 18:04:38 +02:00
|
|
|
public int getIndexOf(String key) {
|
|
|
|
int index = this.keys.get(key);
|
|
|
|
return index;
|
|
|
|
}
|
|
|
|
|
2020-07-28 17:38:34 +02:00
|
|
|
}
|