public class DefaultObjectCreationProcess extends jadex.commons.SimplePropertyObject implements ISpaceProcess
type
: The type of the object to be created (String, required).
properties
: The initial properties of the object (Map, optional).
condition
: A condition to enable/disable object creation (boolean, optional).
tickrate
: Number of ticks between object creation (double, optional, 0 == off).
timerate
: Number of milliseconds between object creation (double, optional, 0 == off).
$space
and to the clock service using $clock
.Modifier and Type | Field and Description |
---|---|
protected jadex.javaparser.SimpleValueFetcher |
fetcher
The fetcher.
|
protected double |
lastrate
The last rate.
|
protected double |
lasttick
The last executed tick.
|
protected double |
lasttime
The last executed time.
|
ID
Constructor and Description |
---|
DefaultObjectCreationProcess()
Create a new create food process.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(jadex.bridge.service.types.clock.IClockService clock,
IEnvironmentSpace space)
Executes the environment process
|
java.lang.Object |
getProperty(java.lang.String name)
Returns a property.
|
void |
shutdown(IEnvironmentSpace space)
This method will be executed by the object before the process is removed
from the execution queue.
|
void |
start(jadex.bridge.service.types.clock.IClockService clock,
IEnvironmentSpace space)
This method will be executed by the object before the process gets added
to the execution queue.
|
addPropertyChangeListener, getProperties, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
protected double lasttick
protected double lasttime
protected double lastrate
protected jadex.javaparser.SimpleValueFetcher fetcher
public DefaultObjectCreationProcess()
public void start(jadex.bridge.service.types.clock.IClockService clock, IEnvironmentSpace space)
start
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public void shutdown(IEnvironmentSpace space)
shutdown
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public void execute(jadex.bridge.service.types.clock.IClockService clock, IEnvironmentSpace space)
execute
in interface ISpaceProcess
clock
- The clock.space
- The space this process is running in.public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface jadex.commons.IPropertyObject
getProperty
in class jadex.commons.SimplePropertyObject
name
- name of the property