jfreerails.world.cargo
Class CargoBatch
java.lang.Object
jfreerails.world.cargo.CargoBatch
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<CargoBatch>, FreerailsSerializable
public class CargoBatch
- extends java.lang.Object
- implements FreerailsSerializable, java.lang.Comparable<CargoBatch>
This class represents a cargo batch (cargo of the same batch is cargo of the
same type that was produced at the same location at the same time).
- Author:
- Luke
- See Also:
- Serialized Form
|
Constructor Summary |
CargoBatch(int type,
int x,
int y,
long time,
int origin)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
cargoType
private final int cargoType
sourceX
private final int sourceX
sourceY
private final int sourceY
stationOfOrigin
private final int stationOfOrigin
timeCreated
private final long timeCreated
CargoBatch
public CargoBatch(int type,
int x,
int y,
long time,
int origin)
getStationOfOrigin
public int getStationOfOrigin()
getCargoType
public int getCargoType()
getSourceX
public int getSourceX()
getSourceY
public int getSourceY()
getTimeCreated
public long getTimeCreated()
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
compareTo
public int compareTo(CargoBatch o)
- Specified by:
compareTo in interface java.lang.Comparable<CargoBatch>