generator2
Class ExternalObjectClasses

java.lang.Object
  |
  +--generator2.ExternalObjectClasses

public class ExternalObjectClasses
extends java.lang.Object

Definition of the properties of the classes of external objects.


Field Summary
protected  int[] beginPortion
          Portion of the classes at the beginning.
protected  java.awt.Color[] color
          The colors.
protected  int[] decreasingFactor
          Decreasing factors of the classes in per cent.
protected  DataSpace ds
          The dataspace.
protected  int[] extension
          Extension of the classes in per cent of the data space *100.
protected  int[] lifetime
          Lifetime of the classes.
protected  int num
          The number of classes.
protected  int[] portion
          Portion of the classes.
protected  int PORTIONSUM
          Sum of all portions.
protected  java.util.Properties properties
          The properties of the generator.
protected  java.util.Random random
          Random generator
protected  Time time
          The time object.
 
Constructor Summary
ExternalObjectClasses(java.util.Properties properties, Time time, DataSpace ds, int numOfClasses)
          ObjectClasses constructor.
 
Method Summary
 int computeNewExternalObjectClass(int time)
          Computes the object class of a new external object.
 java.awt.Color getColor(int c)
          Returns the color of the class.
 int getDecreasingFactor(int c)
          Returns the factor of the class for the decrease of speed.
 int getExtension(int c, int dim)
          Returns the (maximum) extension of the class.
 int getLifetime(int c)
          Returns the (maximum) life time of the class.
 int getNumber()
          Returns the number of object classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Properties properties
The properties of the generator.


time

protected Time time
The time object.


ds

protected DataSpace ds
The dataspace.


num

protected int num
The number of classes.


lifetime

protected int[] lifetime
Lifetime of the classes.


extension

protected int[] extension
Extension of the classes in per cent of the data space *100.


decreasingFactor

protected int[] decreasingFactor
Decreasing factors of the classes in per cent.


PORTIONSUM

protected final int PORTIONSUM
Sum of all portions.

See Also:
Constant Field Values

portion

protected int[] portion
Portion of the classes.


beginPortion

protected int[] beginPortion
Portion of the classes at the beginning.


color

protected java.awt.Color[] color
The colors.


random

protected java.util.Random random
Random generator

Constructor Detail

ExternalObjectClasses

public ExternalObjectClasses(java.util.Properties properties,
                             Time time,
                             DataSpace ds,
                             int numOfClasses)
ObjectClasses constructor.

Parameters:
properties - properties of the generator
time - the time object
ds - data space
numOfClasses - number of object classes
Method Detail

computeNewExternalObjectClass

public int computeNewExternalObjectClass(int time)
Computes the object class of a new external object.

Parameters:
time - time stamp
Returns:
object class

getColor

public java.awt.Color getColor(int c)
Returns the color of the class.

Parameters:
c - object class
Returns:
color

getDecreasingFactor

public int getDecreasingFactor(int c)
Returns the factor of the class for the decrease of speed.

Parameters:
c - object class
Returns:
decreasing factor in per cent

getExtension

public int getExtension(int c,
                        int dim)
Returns the (maximum) extension of the class.

Parameters:
c - object class
dim - dimension (0 = x, 1 = y)
Returns:
extension in per cent of the data space * 100

getLifetime

public int getLifetime(int c)
Returns the (maximum) life time of the class.

Parameters:
c - object class
Returns:
life time

getNumber

public int getNumber()
Returns the number of object classes.

Returns:
number of object classes