}
values.add(shipGroup);
//set estimated ship dates
FastList estimatedShipDates = FastList.newInstance();
for (Map.Entry<Object, Object> entry : shipItemInfo.entrySet()) {
ShoppingCartItem item = (ShoppingCartItem) entry.getKey();
Timestamp estimatedShipDate = item.getEstimatedShipDate();
if (estimatedShipDate != null) {
estimatedShipDates.add(estimatedShipDate);
}
}
if (estimatedShipDates.size() > 0) {
Collections.sort(estimatedShipDates);
Timestamp estimatedShipDate = (Timestamp) estimatedShipDates.getLast();
shipGroup.set("estimatedShipDate", estimatedShipDate);
}
//set estimated delivery dates
FastList estimatedDeliveryDates = FastList.newInstance();
for (Map.Entry <Object, Object> entry : shipItemInfo.entrySet()) {
ShoppingCartItem item = (ShoppingCartItem) entry.getKey();
Timestamp estimatedDeliveryDate = item.getDesiredDeliveryDate();
if (estimatedDeliveryDate != null) {
estimatedDeliveryDates.add(estimatedDeliveryDate);
}
}
if (UtilValidate.isNotEmpty(estimatedDeliveryDates)) {
Collections.sort(estimatedDeliveryDates);
Timestamp estimatedDeliveryDate = (Timestamp) estimatedDeliveryDates.getLast();
shipGroup.set("estimatedDeliveryDate", estimatedDeliveryDate);
}
// create the shipping estimate adjustments
if (shipEstimate.compareTo(BigDecimal.ZERO) != 0) {