|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.Reporter
Abstract class for reporting the computed moving objects. Non-abstract subclasses are generator2.DefaultReporter and generator2.OracleReporter.
| Field Summary | |
static byte |
DEL_OBJECT
Action code "disappering object". |
static byte |
MOVE_OBJECT
Action code "moving object". |
static byte |
NEW_OBJECT
Action code "new object". |
protected int |
numOfEdges
Number of reported edges. |
protected int |
numOfPoints
Number of reported points. |
protected DrawableObjects |
objects
Container of drawable objects. |
protected java.util.Properties |
properties
Properties of the generator. |
protected java.util.Random |
random
The random generator. |
protected static int |
SYMBOLLAYER
Layer of the drawable objects. |
protected boolean |
visualize
Should the objects be visualized? |
static java.lang.String |
VIZ
Name of property indicating a visualization. |
| Constructor Summary | |
Reporter(java.util.Properties properties,
DrawableObjects objects)
Reporter constructor. |
|
| Method Summary | |
void |
close()
Does nothing. |
int |
getNumberOfReportedEdges()
Returns the number of reported edges. |
int |
getNumberOfReportedPoints()
Returns the number of reported points. |
void |
removeReportedObjects()
Removes the reported moving objects. |
void |
reportDisappearingExternalObject(int time,
long id,
int repNum,
int objClass,
java.awt.Rectangle rect)
Does nothing. |
void |
reportDisappearingObject(double time,
long id,
int repNum,
int objClass,
int x,
int y,
double doneDist,
int reportProbability)
Does nothing. |
void |
reportDouble(java.lang.String text,
double value)
Reports a double with an explaining text on the standard output. |
void |
reportEdge(double time,
long objId,
int edgeRepNum,
int objClass,
long edgeId,
int edgeClass,
int x1,
int y1,
double speed,
int x2,
int y2,
int reportProbability)
Does nothing. |
void |
reportInt(java.lang.String text,
long value)
Reports an integer number with an explaining text on the stardard output. |
void |
reportMovingExternalObject(int time,
long id,
int repNum,
int objClass,
java.awt.Rectangle rect)
Reports a moving external object. |
int |
reportMovingObject(int time,
long id,
int repNum,
int objClass,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY,
int reportProbability)
Reports the characteristic properties of a moving object at a time stamp according to its report probability. |
void |
reportNewExternalObject(int time,
long id,
int objClass,
java.awt.Rectangle rect)
Reports a new external object. |
int |
reportNewMovingObject(int time,
long id,
int objClass,
int x,
int y,
double speed,
int nextNodeX,
int nextNodeY,
int reportProbability)
Reports an new moving object if its report probability > 0. |
protected void |
visualizeExternalObject(java.awt.Rectangle rect,
int objClass,
int time)
Visualizes an external object. |
protected void |
visualizeMovingObject(int x,
int y,
int objClass,
int time)
Visualizes a moving object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte NEW_OBJECT
public static final byte MOVE_OBJECT
public static final byte DEL_OBJECT
protected java.util.Properties properties
protected boolean visualize
public static final java.lang.String VIZ
protected static final int SYMBOLLAYER
protected DrawableObjects objects
protected int numOfPoints
protected int numOfEdges
protected java.util.Random random
| Constructor Detail |
public Reporter(java.util.Properties properties,
DrawableObjects objects)
properties - properties of the generatorobjects - container of drawable objects| Method Detail |
public void close()
public int getNumberOfReportedEdges()
public int getNumberOfReportedPoints()
public void removeReportedObjects()
public void reportDisappearingExternalObject(int time,
long id,
int repNum,
int objClass,
java.awt.Rectangle rect)
time - time stampid - object idrepNum - report numberobjClass - object classrect - the area
public void reportDisappearingObject(double time,
long id,
int repNum,
int objClass,
int x,
int y,
double doneDist,
int reportProbability)
time - the arrival time (with fraction)id - object idrepNum - report numberobjClass - object classx - x-coordinatey - y-coordinatedoneDist - the distance since the last reportingreportProbability - value between (0..1000)
public void reportDouble(java.lang.String text,
double value)
text - explaining textvalue - output value
public void reportEdge(double time,
long objId,
int edgeRepNum,
int objClass,
long edgeId,
int edgeClass,
int x1,
int y1,
double speed,
int x2,
int y2,
int reportProbability)
time - time stamp (with fraction) when the edge is entriedobjId - the id of the moving object idedgeRepNum - the edge report numberobjClass - object classedgeId - the edge idedgeClass - the edge classx1 - the first (= current) x-coordinatey1 - the first (= current) y-coordinatespeed - current speedx2 - the second (= later) x-coordinatey2 - the second (= later) y-coordinatereportProbability - (0..1000)
public void reportInt(java.lang.String text,
long value)
text - explaining textvalue - output value
public void reportMovingExternalObject(int time,
long id,
int repNum,
int objClass,
java.awt.Rectangle rect)
time - time stampid - object idrepNum - report numberobjClass - object classrect - the area
public int reportMovingObject(int time,
long id,
int repNum,
int objClass,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY,
int reportProbability)
time - time stampid - object idrepNum - report numberobjClass - object classx - x-coordinatey - y-coordinatespeed - current speeddoneDist - the distance since the last reportingnextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next nodereportProbability - value between (0..1000)
public void reportNewExternalObject(int time,
long id,
int objClass,
java.awt.Rectangle rect)
time - time stampid - object idobjClass - object classrect - the area
public int reportNewMovingObject(int time,
long id,
int objClass,
int x,
int y,
double speed,
int nextNodeX,
int nextNodeY,
int reportProbability)
time - time stampid - object idobjClass - object classx - x-coordinate of starty - y-coordinate of startspeed - current speednextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next nodereportProbability - value between (0..1000)
protected void visualizeExternalObject(java.awt.Rectangle rect,
int objClass,
int time)
rect - the object as rectangleobjClass - object classtime - time stamp
protected void visualizeMovingObject(int x,
int y,
int objClass,
int time)
x - xy - xobjClass - object classtime - time stamp
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||