jfreerails.world.train
Class EngineType

java.lang.Object
  extended by 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

Field Summary
private  java.lang.String engineTypeName
           
private  Money maintenance
           
private  int maxSpeed
           
private  int powerAtDrawbar
           
private  Money price
           
private static long serialVersionUID
           
 
Constructor Summary
EngineType(java.lang.String name, int power, Money m, int speed)
           
EngineType(java.lang.String name, int power, Money m, int speed, Money maint)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getEngineTypeName()
           
 Money getMaintenance()
           
 int getMaxSpeed()
           
 int getPowerAtDrawbar()
           
 Money getPrice()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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