Interface RoutingStrategy

    • 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 Route<P> computeRoute(P currentPos, P finalPos) Computes a route between two positions.
      RoutingStrategy<T, P> cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • computeRoute

         abstract Route<P> computeRoute(P currentPos, P finalPos)

        Computes a route between two positions.

        Parameters:
        currentPos - starting Position
        finalPos - ending Position
        Returns:

        a Route connecting the two points

      • cloneIfNeeded

         RoutingStrategy<T, P> cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
        Parameters:
        destination - the Node where the strategy is being cloned
        reaction - the Reaction where strategy is being cloned
        Returns:

        A copy of the strategy if the strategy is stateful, and this object otherwise. The default implementation assumes a stateless strategy.