org.jscience.architecture.traffic.infrastructure
Class CustomFactory

java.lang.Object
  extended by org.jscience.architecture.traffic.infrastructure.CustomFactory

public class CustomFactory
extends java.lang.Object

DOCUMENT ME!


Field Summary
protected static float[] PersonChances
          DOCUMENT ME!
protected static java.lang.String[] PersonName
          DOCUMENT ME!
protected static int[][] PersonProperties
          DOCUMENT ME!
protected static int PROP_CHANCE
          DOCUMENT ME!
protected static int PROP_GR_LENGTH
          DOCUMENT ME!
protected static int PROP_GR_WIDTH
          DOCUMENT ME!
protected static int PROP_LENGTH
          DOCUMENT ME!
protected static int PROP_NR_CURRENT
          DOCUMENT ME!
protected static int PROP_NR_MAX
          DOCUMENT ME!
protected static int PROP_NR_PASSENGERS
          DOCUMENT ME!
protected static int PROP_ROADUSER_TYPE
          DOCUMENT ME!
protected static int PROP_SPEED
          DOCUMENT ME!
protected static java.util.Random rnd
          DOCUMENT ME!
protected static int[] SupportedTypes
          DOCUMENT ME!
protected static int[][] TypeVehicle
          DOCUMENT ME!
protected static float[] VehicleChances
          DOCUMENT ME!
protected static int[][] VehicleDriver
          DOCUMENT ME!
protected static int[][] VehicleDriverColor
          DOCUMENT ME!
protected static java.lang.String[][] VehicleDriverDescription
          DOCUMENT ME!
protected static java.lang.String[][] VehicleDriverName
          DOCUMENT ME!
protected static java.lang.String[][] VehicleDriverPicture
          DOCUMENT ME!
protected static java.lang.String[][] VehicleDriverSound
          DOCUMENT ME!
protected static java.lang.String[] VehicleName
          DOCUMENT ME!
protected static int[][] VehiclePassenger
          DOCUMENT ME!
protected static int[][] VehicleProperties
          DOCUMENT ME!
 
Constructor Summary
CustomFactory()
           
 
Method Summary
static Roaduser genRoaduser(int type)
          DOCUMENT ME!
static Roaduser genRoaduser(int type, Node start, Node dest, int pos)
          DOCUMENT ME!
static java.awt.Color getColor(CustomRoaduser ru)
          Returns the color used for drawing of given custom.
static java.lang.String getDescription(CustomRoaduser ru)
          Returns the description of given custom.
static int getGraphicalLength(CustomRoaduser ru)
          Returns the graphical length of given custom.
static int getGraphicalWidth(CustomRoaduser ru)
          Returns the graphical width of given custom.
static int getLength(CustomRoaduser ru)
          Returns the length of given custom.
static java.lang.String getName(CustomRoaduser ru)
          Returns the name of given custom.
static java.lang.String getPersonName(int person)
          Returns the name of given person.
static java.lang.String getPicture(CustomRoaduser ru)
          Returns the URL of the picture of given custom.
static java.lang.String getSound(CustomRoaduser ru)
          Returns the URL of the audio clip of given custom.
static int getSpeed(CustomRoaduser ru)
          Returns the speed of given custom.
static int getType(CustomRoaduser ru)
          Returns the roaduser type of given custom.
static java.lang.String getVehicleName(int vehicle)
          Returns the name of given vehicle type.
static void removeCustom(CustomRoaduser ru)
          DOCUMENT ME!
static void reset()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CHANCE

protected static final int PROP_CHANCE
DOCUMENT ME!

See Also:
Constant Field Values

PROP_NR_CURRENT

protected static final int PROP_NR_CURRENT
DOCUMENT ME!

See Also:
Constant Field Values

PROP_NR_MAX

protected static final int PROP_NR_MAX
DOCUMENT ME!

See Also:
Constant Field Values

PROP_SPEED

protected static final int PROP_SPEED
DOCUMENT ME!

See Also:
Constant Field Values

PROP_LENGTH

protected static final int PROP_LENGTH
DOCUMENT ME!

See Also:
Constant Field Values

PROP_GR_LENGTH

protected static final int PROP_GR_LENGTH
DOCUMENT ME!

See Also:
Constant Field Values

PROP_GR_WIDTH

protected static final int PROP_GR_WIDTH
DOCUMENT ME!

See Also:
Constant Field Values

PROP_NR_PASSENGERS

protected static final int PROP_NR_PASSENGERS
DOCUMENT ME!

See Also:
Constant Field Values

PROP_ROADUSER_TYPE

protected static final int PROP_ROADUSER_TYPE
DOCUMENT ME!

See Also:
Constant Field Values

rnd

protected static java.util.Random rnd
DOCUMENT ME!


SupportedTypes

protected static final int[] SupportedTypes
DOCUMENT ME!


TypeVehicle

protected static final int[][] TypeVehicle
DOCUMENT ME!


VehicleName

protected static final java.lang.String[] VehicleName
DOCUMENT ME!


VehicleProperties

protected static final int[][] VehicleProperties
DOCUMENT ME!


VehicleDriver

protected static final int[][] VehicleDriver
DOCUMENT ME!


VehiclePassenger

protected static final int[][] VehiclePassenger
DOCUMENT ME!


PersonName

protected static final java.lang.String[] PersonName
DOCUMENT ME!


PersonProperties

protected static final int[][] PersonProperties
DOCUMENT ME!


VehicleDriverName

protected static final java.lang.String[][] VehicleDriverName
DOCUMENT ME!


VehicleDriverDescription

protected static final java.lang.String[][] VehicleDriverDescription
DOCUMENT ME!


VehicleDriverPicture

protected static final java.lang.String[][] VehicleDriverPicture
DOCUMENT ME!


VehicleDriverSound

protected static final java.lang.String[][] VehicleDriverSound
DOCUMENT ME!


VehicleDriverColor

protected static final int[][] VehicleDriverColor
DOCUMENT ME!


VehicleChances

protected static float[] VehicleChances
DOCUMENT ME!


PersonChances

protected static float[] PersonChances
DOCUMENT ME!

Constructor Detail

CustomFactory

public CustomFactory()
Method Detail

reset

public static void reset()
DOCUMENT ME!


removeCustom

public static void removeCustom(CustomRoaduser ru)
DOCUMENT ME!

Parameters:
ru - DOCUMENT ME!

genRoaduser

public static Roaduser genRoaduser(int type,
                                   Node start,
                                   Node dest,
                                   int pos)
                            throws InfraException
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
start - DOCUMENT ME!
dest - DOCUMENT ME!
pos - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
InfraException - DOCUMENT ME!

genRoaduser

public static Roaduser genRoaduser(int type)
                            throws InfraException
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
InfraException - DOCUMENT ME!

getSpeed

public static int getSpeed(CustomRoaduser ru)
Returns the speed of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getLength

public static int getLength(CustomRoaduser ru)
Returns the length of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getType

public static int getType(CustomRoaduser ru)
Returns the roaduser type of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getGraphicalLength

public static int getGraphicalLength(CustomRoaduser ru)
Returns the graphical length of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getGraphicalWidth

public static int getGraphicalWidth(CustomRoaduser ru)
Returns the graphical width of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getColor

public static java.awt.Color getColor(CustomRoaduser ru)
Returns the color used for drawing of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getVehicleName

public static java.lang.String getVehicleName(int vehicle)
Returns the name of given vehicle type.

Parameters:
vehicle - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPersonName

public static java.lang.String getPersonName(int person)
Returns the name of given person.

Parameters:
person - DOCUMENT ME!
Returns:
DOCUMENT ME!

getName

public static java.lang.String getName(CustomRoaduser ru)
Returns the name of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDescription

public static java.lang.String getDescription(CustomRoaduser ru)
Returns the description of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPicture

public static java.lang.String getPicture(CustomRoaduser ru)
Returns the URL of the picture of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!

getSound

public static java.lang.String getSound(CustomRoaduser ru)
Returns the URL of the audio clip of given custom.

Parameters:
ru - DOCUMENT ME!
Returns:
DOCUMENT ME!