Commit 3f26cc59 authored by patrick.lambert's avatar patrick.lambert
Browse files

chek if it is possible to upadate the temperature

parent c8b5512d
......@@ -167,10 +167,14 @@ public class Basin implements Position, Comparable<Basin> {
public void updateSeasonalTemperatures(Long year) {
winterTemperature = seasonalTemperaturesSeries.get(year)[0];
springTemperature = seasonalTemperaturesSeries.get(year)[1];
summerTemperature = seasonalTemperaturesSeries.get(year)[2];
fallTemperature = seasonalTemperaturesSeries.get(year)[3];
if (seasonalTemperaturesSeries.containsKey(year)) {
winterTemperature = seasonalTemperaturesSeries.get(year)[0];
springTemperature = seasonalTemperaturesSeries.get(year)[1];
summerTemperature = seasonalTemperaturesSeries.get(year)[2];
fallTemperature = seasonalTemperaturesSeries.get(year)[3];
} else {
System.out.println("no temperatures for " + this.name + " (" + getClass().getSimpleName() + ") in " + year);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment