A lot of things.
- Change tests directory location. - Fix Merlu CSV UTF8 encoding. - Make classes for ParasitesPeru2021.csv Parsing.
This commit is contained in:
@@ -29,8 +29,7 @@ public class Mackerel extends Poisson implements DataParsing {
|
||||
* @param data
|
||||
* @return tableau des poissons
|
||||
*/
|
||||
@Override
|
||||
public HashSet<Poisson> parse(RawData data) throws RawDataOverflow {
|
||||
public static HashSet<Poisson> parse(RawData data) throws RawDataOverflow {
|
||||
|
||||
HashMap<String,String> temp = new HashMap<>();
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ public class Merlu extends Poisson implements DataParsing {
|
||||
* @param data
|
||||
* @return tableau des poissons
|
||||
*/
|
||||
@Override
|
||||
public HashSet<Poisson> parse(RawData data) throws RawDataOverflow {
|
||||
public static HashSet<Poisson> parse(RawData data) throws RawDataOverflow {
|
||||
|
||||
HashMap<String,String> temp = new HashMap<>();
|
||||
|
||||
@@ -39,7 +38,7 @@ public class Merlu extends Poisson implements DataParsing {
|
||||
|
||||
for (int i = 0; i < data.getData().getFirst().size(); i++) {
|
||||
temp = data.getEntry(i);
|
||||
Poisson newP = new Merlu(temp.get("nom.merlu"),valueOf(temp.get("m.size")),valueOf(temp.get("number of Anisakis sp L3")));
|
||||
Poisson newP = new Merlu(temp.get("nom.merlu"),valueOf(temp.get("m.size (mm)")),valueOf(temp.get("number of Anisakis sp L3")));
|
||||
|
||||
fishSet.add(newP);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Poisson{
|
||||
*/
|
||||
@Override
|
||||
public String toString(){
|
||||
String result = "[ %5s : %4d mm, %4d g, %4d taux d'infestation ]";
|
||||
return String.format(result, this.getClass().getSimpleName(), this.getLength(), this.getWeight(), this.getInfestation());
|
||||
String result = "[ %5s : %4f mm, %4f g, %4f taux d'infestation ]";
|
||||
return String.format(result, this.getClass().getSimpleName(), this.getLength(), this.getWeight(), this.getInfestation() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user