Class AbstractNeighborAction

    • 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
      abstract AbstractNeighborAction<T> cloneAction(Node<T> node, Reaction<T> reaction)
      void execute() Execute the action on a random neighbor if the node has a neighborhood.
      abstract void execute(Node<T> targetNode) Execute the action on the given target node.
      final Context getContext()
      • Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction

        getOutboundDependencies, toString
      • 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()

        Execute the action on a random neighbor if the node has a neighborhood. Otherwise do nothing.

      • execute

         abstract void execute(Node<T> targetNode)

        Execute the action on the given target node. NOTE, it is NOT guaranteed that this method checks if the target node is in the actual neighborhood of the node.

        Parameters:
        targetNode - the node where the action will be execute