Package it.unibo.alchemist.model.actions
Class AbstractMoveNode
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,java.io.Serializable
public abstract class AbstractMoveNode<T, P extends Position<P>> extends AbstractAction<T>
This action moves a node inside a given environment.
-
-
Method Summary
Modifier and Type Method Description void
execute()
Detects if the move is in absolute or relative coordinates, then calls the correct method on the Environment. final Context
getContext()
abstract P
getNextPosition()
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction
getOutboundDependencies, toString
-
Methods inherited from class it.unibo.alchemist.model.Action
cloneAction, getOutboundDependencies
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
execute
void execute()
Detects if the move is in absolute or relative coordinates, then calls the correct method on the Environment.
-
getContext
final Context getContext()
-
getNextPosition
abstract P getNextPosition()
- Returns:
The next position where to move, in absolute or relative coordinates depending on the value of isAbsolute.
-
-
-
-