jfreerails.world.train
Interface Schedule

All Known Implementing Classes:
ImmutableSchedule, MutableSchedule

public interface Schedule

Defines methods to access a train's schedule.

Author:
Luke Lindsay

Field Summary
static int MAXIMUM_NUMBER_OF_ORDER
           
static int PRIORITY_ORDERS
           
 
Method Summary
 boolean autoConsist()
          Returns the value for the autoconsist flag at the next scheduled stop.
 int getNextScheduledOrder()
           
 int getNumOrders()
          Returns number of non priority orders + number of priority orders.
 TrainOrdersModel getOrder(int i)
           
 int getOrderToGoto()
          Returns the number of the order the train is currently carry out.
 int getStationToGoto()
          Returns the station number of the next station the train is scheduled to stop at.
 ImInts getWagonsToAdd()
          Returns the wagons to add at the next scheduled stop.
 boolean hasPriorityOrders()
           
 

Field Detail

PRIORITY_ORDERS

static final int PRIORITY_ORDERS
See Also:
Constant Field Values

MAXIMUM_NUMBER_OF_ORDER

static final int MAXIMUM_NUMBER_OF_ORDER
See Also:
Constant Field Values
Method Detail

getOrder

TrainOrdersModel getOrder(int i)

getOrderToGoto

int getOrderToGoto()
Returns the number of the order the train is currently carry out.


getStationToGoto

int getStationToGoto()
Returns the station number of the next station the train is scheduled to stop at.


getWagonsToAdd

ImInts getWagonsToAdd()
Returns the wagons to add at the next scheduled stop.


autoConsist

boolean autoConsist()
Returns the value for the autoconsist flag at the next scheduled stop.


hasPriorityOrders

boolean hasPriorityOrders()

getNumOrders

int getNumOrders()
Returns number of non priority orders + number of priority orders.

Returns:
Number of orders.

getNextScheduledOrder

int getNextScheduledOrder()