jfreerails.world.train
Class EngineType
java.lang.Object
jfreerails.world.train.EngineType
- All Implemented Interfaces:
- java.io.Serializable, FreerailsSerializable
public final class EngineType
- extends java.lang.Object
- implements FreerailsSerializable
This class represents an engine type, for example 'Grass Hopper'. It
encapsulates the properties that are common to all engines of the same type.
- Author:
- Luke
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
engineTypeName
private final java.lang.String engineTypeName
maintenance
private final Money maintenance
maxSpeed
private final int maxSpeed
powerAtDrawbar
private final int powerAtDrawbar
price
private final Money price
EngineType
public EngineType(java.lang.String name,
int power,
Money m,
int speed)
EngineType
public EngineType(java.lang.String name,
int power,
Money m,
int speed,
Money maint)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
getEngineTypeName
public java.lang.String getEngineTypeName()
getMaintenance
public Money getMaintenance()
getMaxSpeed
public int getMaxSpeed()
getPowerAtDrawbar
public int getPowerAtDrawbar()
getPrice
public Money getPrice()
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object