Class ExternalInterruption

java.lang.Object
fr.inria.rules.integraal.forward_chaining.chase.halting_condition.ExternalInterruption
All Implemented Interfaces:
HaltingCondition

public class ExternalInterruption extends Object implements HaltingCondition
This halting condition stops the chase if the boolean is set to true
  • Constructor Details

    • ExternalInterruption

      public ExternalInterruption(AtomicBoolean stop)
      Creates an interruption condition driven by an external flag.
      Parameters:
      stop - the boolean to observe
  • Method Details

    • check

      public boolean check()
      Description copied from interface: HaltingCondition
      Checks whether the halting condition is currently satisfied.
      Specified by:
      check in interface HaltingCondition
      Returns:
      true iff the condition is respected
    • init

      public void init(Chase c)
      Description copied from interface: HaltingCondition
      Initialize the halting condition for the given chase
      Specified by:
      init in interface HaltingCondition
      Parameters:
      c - the Chase object