Example #1
0
 /**
  * Computes the minimal early time range of all bundle orders in this order
  *
  * @return Minimal early time slot
  */
 public int getMinEarly() throws OrderException {
   int result = 10000;
   for (Iterator<AbstractBundleOrder> bundleIterator = bundleOrders.values().iterator();
       bundleIterator.hasNext(); ) {
     AbstractBundleOrder bundleOrder = (AbstractBundleOrder) bundleIterator.next();
     if (bundleOrder.getEarly() < result) {
       result = bundleOrder.getEarly();
     }
   }
   if (result == 10000) {
     throw new OrderException("No min early computed. No bundle found in this order");
   }
   return result;
 }