|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfreerails.world.train.ImmutableSchedule
public class ImmutableSchedule
A Schedule that is immutable.
| Field Summary | |
|---|---|
private boolean |
hasPriorityOrders
|
private int |
nextScheduledOrder
|
private ImList<TrainOrdersModel> |
orders
|
private static long |
serialVersionUID
|
| Fields inherited from interface jfreerails.world.train.Schedule |
|---|
MAXIMUM_NUMBER_OF_ORDER, PRIORITY_ORDERS |
| Constructor Summary | |
|---|---|
ImmutableSchedule(TrainOrdersModel[] orders,
int gotoStation,
boolean hasPriorityOrders)
|
|
| Method Summary | |
|---|---|
boolean |
autoConsist()
Returns the value for the autoconsist flag at the next scheduled stop. |
boolean |
equals(java.lang.Object o)
|
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. |
int |
hashCode()
|
boolean |
hasPriorityOrders()
|
boolean |
stopsAtStation(int stationNumber)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final ImList<TrainOrdersModel> orders
private final int nextScheduledOrder
private final boolean hasPriorityOrders
| Constructor Detail |
|---|
public ImmutableSchedule(TrainOrdersModel[] orders,
int gotoStation,
boolean hasPriorityOrders)
| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic TrainOrdersModel getOrder(int i)
getOrder in interface Schedulepublic int getOrderToGoto()
Schedule
getOrderToGoto in interface Schedulepublic int getStationToGoto()
Schedule
getStationToGoto in interface Schedulepublic ImInts getWagonsToAdd()
Schedule
getWagonsToAdd in interface Schedulepublic boolean hasPriorityOrders()
hasPriorityOrders in interface Schedulepublic int getNumOrders()
Schedule
getNumOrders in interface Schedulepublic int getNextScheduledOrder()
getNextScheduledOrder in interface Schedulepublic boolean stopsAtStation(int stationNumber)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean autoConsist()
Schedule
autoConsist in interface Schedule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||