for (AvailabilityPeriod period : list)
{
Date start = DatatypeConverter.parseDate(period.getAvailableFrom());
Date end = DatatypeConverter.parseDate(period.getAvailableTo());
Number units = DatatypeConverter.parseUnits(period.getAvailableUnits());
Availability availability = new Availability(start, end, units);
table.add(availability);
}
Collections.sort(table);
}
}