|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.ObjectClasses
Definition of the properties of the classes of moving objects.
| Field Summary | |
protected java.awt.Color[] |
color
The colors. |
protected double[] |
maxSpeed
Maximum speed of the classes. |
protected int |
num
The number of classes. |
protected double[] |
portion
The portion of the classes (sum = 1 = 100%). |
protected int[] |
reportProbability
The report probability of the classes (1000 = 100%). |
protected Time |
time
The time object. |
| Constructor Summary | |
ObjectClasses(java.util.Properties properties,
Time time,
DataSpace ds,
int numOfClasses,
int reportProb,
int maxSpeedDivisor)
ObjectClasses constructor. |
|
| Method Summary | |
int |
computeNewObjectClass(int time)
Computes the object class of a new moving object. |
java.awt.Color |
getColor(int c)
Returns the color of the class. |
double |
getMaxSpeed(int c)
Returns the maximum speed of an object class. |
int |
getNumber()
Returns the number of object classes. |
int |
getReportProbability(int c)
Returns the report probability of an object class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Time time
protected int num
protected double[] maxSpeed
protected double[] portion
protected int[] reportProbability
protected java.awt.Color[] color
| Constructor Detail |
public ObjectClasses(java.util.Properties properties,
Time time,
DataSpace ds,
int numOfClasses,
int reportProb,
int maxSpeedDivisor)
properties - properties of the generatortime - the time objectds - the data spacenumOfClasses - number of object classesreportProb - report probability (0-1000)maxSpeedDivisor - maximum speed divisor| Method Detail |
public int computeNewObjectClass(int time)
time - current time stamp
public java.awt.Color getColor(int c)
c - object class
public double getMaxSpeed(int c)
c - object class
public int getNumber()
public int getReportProbability(int c)
c - object class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||