jfreerails.world.cargo
Class CargoType

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

public final class CargoType
extends java.lang.Object
implements FreerailsSerializable

Represents a type of cargo.

Author:
luke
See Also:
Serialized Form

Field Summary
private static java.lang.String[] categories
           
private  java.lang.String category
           
private  java.lang.String name
           
private static long serialVersionUID
           
private  int unitWeight
           
 
Constructor Summary
CargoType(int weight, java.lang.String s, java.lang.String cat)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCategory()
           
 int getCategoryNumber()
           
static int getCategoryNumber(java.lang.String categoryName)
           
 java.lang.String getDisplayName()
          Returns the name, replacing any underscores with spaces.
 java.lang.String getName()
           
static int getNumberOfCategories()
           
 int getUnitWeight()
           
 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

categories

private static final java.lang.String[] categories

category

private final java.lang.String category

name

private final java.lang.String name

unitWeight

private final int unitWeight
Constructor Detail

CargoType

public CargoType(int weight,
                 java.lang.String s,
                 java.lang.String cat)
Method Detail

getCategoryNumber

public static int getCategoryNumber(java.lang.String categoryName)

getNumberOfCategories

public static int getNumberOfCategories()

equals

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

getCategory

public java.lang.String getCategory()

getCategoryNumber

public int getCategoryNumber()

getDisplayName

public java.lang.String getDisplayName()
Returns the name, replacing any underscores with spaces.


getName

public java.lang.String getName()

getUnitWeight

public int getUnitWeight()

hashCode

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

toString

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