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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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
    • Constructor Detail

    • Method Detail

      • execute

         void execute()

        Detects if the move is in absolute or relative coordinates, then calls the correct method on the Environment.

      • getNextPosition

         abstract P getNextPosition()
        Returns:

        The next position where to move, in absolute or relative coordinates depending on the value of isAbsolute.