Interface ReplanningToolFactory

    • 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
      Tool replanAlways(Tool tool) Make this tool always replan after execution, adding the artifact to the blackboard.
      <T extends Any> DelegatingTool conditionalReplan(Tool tool, Function2<T, ReplanContext, ReplanDecision> decider) When the decider returns a ReplanDecision, replan after execution, adding the artifact to the blackboard along with any additional updates from the decision.
      <T extends Any> DelegatingTool replanWhen(Tool tool, Function1<T, Boolean> predicate) When the predicate matches the tool result artifact, replan, adding the artifact to the blackboard.
      <T extends Any> DelegatingTool replanAndAdd(Tool tool, Function1<T, Object> valueComputer) Replan and add the object returned by the valueComputer to the blackboard.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • replanAlways

         Tool replanAlways(Tool tool)

        Make this tool always replan after execution, adding the artifact to the blackboard.

      • conditionalReplan

         <T extends Any> DelegatingTool conditionalReplan(Tool tool, Function2<T, ReplanContext, ReplanDecision> decider)

        When the decider returns a ReplanDecision, replan after execution, adding the artifact to the blackboard along with any additional updates from the decision. The decider receives the artifact cast to type T and the replan context. If the artifact is null or cannot be cast to T, the decider is not called.

      • replanWhen

         <T extends Any> DelegatingTool replanWhen(Tool tool, Function1<T, Boolean> predicate)

        When the predicate matches the tool result artifact, replan, adding the artifact to the blackboard. The predicate receives the artifact cast to type T. If the artifact is null or cannot be cast to T, returns normally.

      • replanAndAdd

         <T extends Any> DelegatingTool replanAndAdd(Tool tool, Function1<T, Object> valueComputer)

        Replan and add the object returned by the valueComputer to the blackboard.

        Parameters:
        tool - The tool to wrap
        valueComputer - Function that takes the artifact of type T and returns an object to add to the blackboard, or null to not replan