|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.ExternalObjectGenerator
Class for creating and modifying external objects.
| Field Summary | |
protected ExternalObjectClasses |
classes
Classes of external objects. |
protected static int |
currId
The counter for the identifiers. |
protected DataSpace |
dataspace
Dataspace of the network. |
protected int |
numOfExtObjAtBeginning
Number of external objects at the beginning. |
protected int |
numOfExtObjPerTime
Number of generated external objects per time. |
protected java.util.Properties |
properties
Properties of the generator. |
protected java.util.Random |
random
Random generator. |
protected Time |
time
The time object. |
| Constructor Summary | |
ExternalObjectGenerator(java.util.Properties properties,
Time time,
DataSpace dataspace,
ExternalObjectClasses classes,
int numOfExtObjPerTime,
int numOfExtObjAtBeginning)
Constructor. |
|
| Method Summary | |
ExternalObject |
computeExternalObject(int time)
Computes a new external object. |
MBR |
computeNewPositionAndSize(int time,
ExternalObject obj)
Computes the new position and size of an external object. |
boolean |
externalObjectsExist()
Returns whether external objects exist or not. |
int |
numberOfNewObjects(int time)
Returns the number of new external objects at a time stamp. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static int currId
protected java.util.Properties properties
protected Time time
protected DataSpace dataspace
protected ExternalObjectClasses classes
protected int numOfExtObjPerTime
protected int numOfExtObjAtBeginning
protected java.util.Random random
| Constructor Detail |
public ExternalObjectGenerator(java.util.Properties properties,
Time time,
DataSpace dataspace,
ExternalObjectClasses classes,
int numOfExtObjPerTime,
int numOfExtObjAtBeginning)
properties - properties of the generatortime - the time objectdataspace - the dataspaceclasses - the classes of external objectsnumOfExtObjPerTime - number of external objects per timenumOfExtObjAtBeginning - number of external objects at the beginning| Method Detail |
public ExternalObject computeExternalObject(int time)
time - the time stamp
public MBR computeNewPositionAndSize(int time,
ExternalObject obj)
time - actual timeobj - the external object
public boolean externalObjectsExist()
public int numberOfNewObjects(int time)
time - the time stamp
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||