if (PRIORITY_ORDERS == orderNumber && hasPriorityOrders) {  hasPriorityOrders = false; }  orders.remove(orderNumber);   if (nextScheduledOrder > orderNumber) { nextScheduledOrder--; }  if (orders.size() <= nextScheduledOrder) { nextScheduledOrder = firstScheduleStop(); }  if (0 == numberOfScheduledStops()) { nextScheduledOrder = -1; }
orders.remove(orderNumber);
    public void removeOrder(int orderNumber) {        if (PRIORITY_ORDERS == orderNumber && hasPriorityOrders) {            //If we are removing the prority stop.            hasPriorityOrders = false;        }        orders.remove(orderNumber);        /* shift current station down */        if (nextScheduledOrder > orderNumber) {            nextScheduledOrder--;        }        if (orders.size() <= nextScheduledOrder) {            nextScheduledOrder = firstScheduleStop();        }        if (0 == numberOfScheduledStops()) {            nextScheduledOrder = -1;        }    }