jfreerails.world.train
Class WagonType

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

public class WagonType
extends java.lang.Object
implements FreerailsSerializable

This class represents a wagon type, for example 'goods wagon'. It encapsulates the properties of a wagon that are common to all wagons of the same type.

Author:
Luke
See Also:
Serialized Form

Field Summary
static int BULK_FREIGHT
           
static int ENGINE
           
static int FAST_FREIGHT
           
static int MAIL
           
static int NUMBER_OF_CATEGORIES
           
static int PASSENGER
           
private static long serialVersionUID
           
static int SLOW_FREIGHT
           
private  int typeCategory
           
private  java.lang.String typeName
           
static int UNITS_OF_CARGO_PER_WAGON
           
 
Constructor Summary
WagonType(java.lang.String name, int category)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getCategory()
           
 java.lang.String getName()
           
 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

BULK_FREIGHT

public static final int BULK_FREIGHT
See Also:
Constant Field Values

ENGINE

public static final int ENGINE
See Also:
Constant Field Values

FAST_FREIGHT

public static final int FAST_FREIGHT
See Also:
Constant Field Values

MAIL

public static final int MAIL
See Also:
Constant Field Values

NUMBER_OF_CATEGORIES

public static final int NUMBER_OF_CATEGORIES
See Also:
Constant Field Values

PASSENGER

public static final int PASSENGER
See Also:
Constant Field Values

SLOW_FREIGHT

public static final int SLOW_FREIGHT
See Also:
Constant Field Values

UNITS_OF_CARGO_PER_WAGON

public static final int UNITS_OF_CARGO_PER_WAGON
See Also:
Constant Field Values

typeCategory

private final int typeCategory

typeName

private final java.lang.String typeName
Constructor Detail

WagonType

public WagonType(java.lang.String name,
                 int category)
Method Detail

equals

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

getCategory

public int getCategory()

getName

public java.lang.String getName()

hashCode

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object