// that we have a guaranteed multiple of 5.
String periodAsString;
// Double period;
String type;
String message;
HistoricRecord record;
List<HistoricRecord> recordsList = new ArrayList<HistoricRecord>();
for (int index = 0; index < stopIndex; index += 5) {
periodAsString = historicStringArray[index];
type = historicStringArray[index + 1];
message = historicStringArray[index + 2];
// try {
// period = Double.valueOf(periodAsString);
// }
// catch (NumberFormatException e) {
// e.printStackTrace();
// throw new SalsaDeviceException("Error : cannot parse period \"" + periodAsString
// + "\" when reading the historic : " + e.getMessage(), e);
// }
record = new HistoricRecord();
record.setPeriod(periodAsString);
record.setType(type);
record.setMessage(message);
recordsList.add(record);
}
return recordsList;
}