public Builder scheduleDelivery(CarrierShipment shipment){
  assertIsNotNull(shipment);
  boolean wasOpen=openPickups.remove(shipment);
  if (!wasOpen) {
    throw new IllegalStateException("Trying to deliver something which was not picked up.");
  }
  assertLastElementIsLeg();
  tourElements.add(createDelivery(shipment));
  previousElementIsActivity=true;
  return this;
}

public Builder scheduleDelivery ( CarrierShipment shipment ) { assertIsNotNull ( shipment ) ; boolean wasOpen = openPickups . remove ( shipment ) ; if ( ! wasOpen ) { throw new IllegalStateException ( "Trying to deliver something which was not picked up." ) ; } assertLastElementIsLeg ( ) ; tourElements . add ( createDelivery ( shipment ) ) ; previousElementIsActivity = true ; return this ; }
schedules a delivery of a shipment , i . e . adds a delivery activity to current tour .
