コード例 #1
0
ファイル: AbstractOrder.java プロジェクト: ikfj/wmart
 /**
  * Computes the maximal latest time range of all bundle orders in this order
  *
  * @return Maximal latest time slot
  */
 public int getMaxLate() throws OrderException {
   int result = -1;
   for (Iterator<AbstractBundleOrder> bundleIterator = bundleOrders.values().iterator();
       bundleIterator.hasNext(); ) {
     AbstractBundleOrder bundleOrder = (AbstractBundleOrder) bundleIterator.next();
     if (bundleOrder.getLatest() > result) result = bundleOrder.getLatest();
   }
   if (result == -1) {
     throw new OrderException(
         "No max late computed. No bundle found in this order with a size of "
             + this.getBundleOrders().size());
   }
   return result;
 }