示例#1
0
 public float getMaxTemp(OneDay oneDay) {
   float max_temp = 0;
   for (Record record : oneDay.getRecords()) {
     if (max_temp < record.getBeginTemperature()) max_temp = record.getBeginTemperature();
     if (max_temp < record.getEndTemperature()) max_temp = record.getEndTemperature();
   }
   return max_temp;
 }
示例#2
0
 public float getMinTemp(OneDay oneDay) {
   float min_temp = 100;
   for (Record record : oneDay.getRecords()) {
     if (min_temp > record.getBeginTemperature()) min_temp = record.getBeginTemperature();
     if (min_temp > record.getEndTemperature()) min_temp = record.getEndTemperature();
   }
   return min_temp;
 }
示例#3
0
 public float getMinTemp(Record record) {
   float min_temp = record.getBeginTemperature();
   if (min_temp > record.getEndTemperature()) min_temp = record.getEndTemperature();
   return min_temp;
 }
示例#4
0
 public float getMaxTemp(Record record) {
   float max_temp = record.getBeginTemperature();
   if (max_temp < record.getEndTemperature()) max_temp = record.getEndTemperature();
   return max_temp;
 }