JavaDoc et Completion Bullshit.
This commit is contained in:
@@ -7,6 +7,7 @@ import ecoparasite.input.RawDataOverflow;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
|
||||
import static java.lang.Double.valueOf;
|
||||
|
||||
@@ -54,7 +55,12 @@ public class Mackerel extends Poisson implements DataParsing {
|
||||
|
||||
for (int i = 0; i < data.getData().getFirst().size(); i++) {
|
||||
temp = data.getEntry(i);
|
||||
Poisson newP = new Mackerel(temp.get("Sample_code"),valueOf(temp.get("StandardLength")),valueOf(temp.get("NParasitesViscera")));
|
||||
|
||||
String id = !Objects.equals(temp.get("Sample_code"), "") ? temp.get("Sample_code") : null;
|
||||
Double size = !Objects.equals(temp.get("StandardLength"), "") ? valueOf(temp.get("StandardLength")) : null;
|
||||
Double infes = !Objects.equals(temp.get("NParasitesTotal"), "") ? valueOf(temp.get("NParasitesTotal")) : null;
|
||||
|
||||
Poisson newP = new Mackerel(id,size,infes);
|
||||
newP.setFishParts( Mackerel.parsePartiePoisson(temp) );
|
||||
fishSet.add(newP);
|
||||
}
|
||||
@@ -63,6 +69,11 @@ public class Mackerel extends Poisson implements DataParsing {
|
||||
return fishSet;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param entry
|
||||
* @return
|
||||
*/
|
||||
private static HashSet<PartiePoisson> parsePartiePoisson(HashMap<String,String> entry){
|
||||
|
||||
HashSet<PartiePoisson> response = new HashSet<>();
|
||||
@@ -70,7 +81,7 @@ public class Mackerel extends Poisson implements DataParsing {
|
||||
for( String k: entry.keySet() ){
|
||||
if( k.contains( "Anisakis_" ) ){
|
||||
String bodyPart = k.split( "Anisakis_" )[1];
|
||||
Double value = valueOf(entry.get(k));
|
||||
Double value = !Objects.equals(entry.get(k), "") ? valueOf(entry.get(k)) : null;
|
||||
PartiePoisson p = new PartiePoisson(bodyPart, value);
|
||||
response.add(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user