public void addOrder(int orderNumber, TrainOrdersModel order) { orders.add(orderNumber, order);  if (nextScheduledOrder >= orderNumber) { nextScheduledOrder++; }  if (-1 == nextScheduledOrder && 0 < numberOfScheduledStops()) { nextScheduledOrder = firstScheduleStop(); }
public void addOrder(int index, TrainOrdersModel order) { orders.add(index, order);
    public void addOrder(int orderNumber, TrainOrdersModel order) {        orders.add(orderNumber, order);        if (nextScheduledOrder >= orderNumber) {            nextScheduledOrder++;        }        if (-1 == nextScheduledOrder && 0 < numberOfScheduledStops()) {            nextScheduledOrder = firstScheduleStop();        }    }