Package jadex.bdi.examples.cleanerworld
Class MoveTask
- java.lang.Object
-
- jadex.commons.SimplePropertyObject
-
- jadex.extension.envsupport.environment.AbstractTask
-
- jadex.bdi.examples.cleanerworld.MoveTask
-
- All Implemented Interfaces:
IPropertyObject
,IObjectTask
public class MoveTask extends AbstractTask
Move an object towards a destination.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_CHARGESTATE
The energy charge state.static java.lang.String
PROPERTY_DESTINATION
The destination property.static java.lang.String
PROPERTY_SPEED
The speed property (units per second).static java.lang.String
PROPERTY_TYPENAME
The destination property.static java.lang.String
PROPERTY_VISION
The vision property (radius in units).-
Fields inherited from class jadex.extension.envsupport.environment.AbstractTask
condition, finished, PROPERTY_CONDITION
-
Fields inherited from class jadex.commons.SimplePropertyObject
pcs, properties
-
Fields inherited from interface jadex.extension.envsupport.environment.IObjectTask
PROPERTY_ID
-
-
Constructor Summary
Constructors Constructor Description MoveTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock)
Executes the task.static boolean
isGreater(IVector2 pos, IVector2 pos1, IVector2 pos2)
-
Methods inherited from class jadex.extension.envsupport.environment.AbstractTask
isFinished, setFinished, shutdown, start
-
Methods inherited from class jadex.commons.SimplePropertyObject
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
-
-
-
-
Field Detail
-
PROPERTY_TYPENAME
public static final java.lang.String PROPERTY_TYPENAME
The destination property.- See Also:
- Constant Field Values
-
PROPERTY_DESTINATION
public static final java.lang.String PROPERTY_DESTINATION
The destination property.- See Also:
- Constant Field Values
-
PROPERTY_SPEED
public static final java.lang.String PROPERTY_SPEED
The speed property (units per second).- See Also:
- Constant Field Values
-
PROPERTY_VISION
public static final java.lang.String PROPERTY_VISION
The vision property (radius in units).- See Also:
- Constant Field Values
-
PROPERTY_CHARGESTATE
public static final java.lang.String PROPERTY_CHARGESTATE
The energy charge state.- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public void execute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock)
Executes the task. Handles exceptions. Subclasses should implement doExecute() instead.- Specified by:
execute
in interfaceIObjectTask
- Overrides:
execute
in classAbstractTask
- Parameters:
space
- The environment in which the task is executing.obj
- The object that is executing the task.progress
- The time that has passed according to the environment executor.clock
- The clock service.
-
-