Maciek refactor works + delete unnecesery interface (conception changed)
This commit is contained in:
@ -1,20 +1,25 @@
|
||||
package com.plannaplan.models;
|
||||
|
||||
import java.util.Dictionary;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
|
||||
//dictionary is deprecated use hashmap instead
|
||||
public class FileData {
|
||||
|
||||
private Dictionary<String, Integer> keys;
|
||||
private HashMap<String, Integer> keys;
|
||||
private Iterator<Row> rows;
|
||||
|
||||
public FileData(Dictionary<String, Integer> keys, Iterator<Row> rows) {
|
||||
this.setKeys(keys);
|
||||
this.setRows(rows);
|
||||
//why variable is called keys2, could it be more specific???
|
||||
//why use setters in constructor here instead of assignments???
|
||||
// thought that setters are used to change values in runtime
|
||||
public FileData(HashMap<String, Integer> keys, Iterator<Row> rows) {
|
||||
this.keys = keys;
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Iterator<Row> getRows() {
|
||||
return rows;
|
||||
}
|
||||
@ -23,11 +28,11 @@ public class FileData {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public Dictionary<String, Integer> getKeys() {
|
||||
public HashMap<String, Integer> getKeys() {
|
||||
return keys;
|
||||
}
|
||||
|
||||
public void setKeys(Dictionary<String, Integer> keys) {
|
||||
public void setKeys(HashMap<String, Integer> keys) {
|
||||
this.keys = keys;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user