jfreerails.world.train
Class TrainOrdersModel

java.lang.Object
  extended by jfreerails.world.train.TrainOrdersModel
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public class TrainOrdersModel
extends java.lang.Object
implements FreerailsSerializable

This class encapsulates the orders for a train.

Author:
Luke
See Also:
Serialized Form

Field Summary
 boolean autoConsist
           
 ImInts consist
          The wagon types to add; if null, then no change.
private static int MAXIMUM_NUMBER_OF_WAGONS
           
private static long serialVersionUID
           
 int stationId
           
 boolean waitUntilFull
           
 
Constructor Summary
TrainOrdersModel(int station, ImInts newConsist, boolean wait, boolean auto)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 ImInts getConsist()
           
 int getStationID()
           
 boolean getWaitUntilFull()
           
 int hashCode()
           
 boolean hasLessThanMaxiumNumberOfWagons()
           
 boolean isAutoConsist()
           
 boolean isNoConsistChange()
           
 boolean orderHasWagons()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

MAXIMUM_NUMBER_OF_WAGONS

private static final int MAXIMUM_NUMBER_OF_WAGONS
See Also:
Constant Field Values

waitUntilFull

public final boolean waitUntilFull

autoConsist

public final boolean autoConsist

consist

public final ImInts consist
The wagon types to add; if null, then no change.


stationId

public final int stationId
Constructor Detail

TrainOrdersModel

public TrainOrdersModel(int station,
                        ImInts newConsist,
                        boolean wait,
                        boolean auto)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getConsist

public ImInts getConsist()
Returns:
either (1) an array of cargo type ids or (2) null to represent 'no change'.

getStationID

public int getStationID()

isNoConsistChange

public boolean isNoConsistChange()

getWaitUntilFull

public boolean getWaitUntilFull()

orderHasWagons

public boolean orderHasWagons()

hasLessThanMaxiumNumberOfWagons

public boolean hasLessThanMaxiumNumberOfWagons()

isAutoConsist

public boolean isAutoConsist()