Class FixedPriorityConflictSet

    • Method Detail

      • getNextActivation

        public Activation<?> getNextActivation()
        Returns one of the activations of one of the rules with the lowest priority.
        Specified by:
        getNextActivation in interface ConflictSet
        Returns:
        the next activation chosen by the resolver
      • addActivation

        public boolean addActivation​(Activation<?> activation)
        Description copied from interface: ChangeableConflictSet
        This method is called by the Agenda when an activation changes state and becomes or is still enabled.

        NOTE: The ChangeableConflictSet is responsible for handling that add may be called multiple times on an Activation already in the conflict set!

        Specified by:
        addActivation in interface ChangeableConflictSet
        Parameters:
        activation - the activation that should be added to the conflict set
        Returns:
        true, if the conflict set changed
      • removeActivation

        public boolean removeActivation​(Activation<?> activation)
        Description copied from interface: ChangeableConflictSet
        This method is called by the Agenda when an activation changes state and becomes or is still disabled.

        NOTE: The ChangeableConflictSet is responsible for handling that remove may be called on Activations that are not in the conflict set!

        Specified by:
        removeActivation in interface ChangeableConflictSet
        Parameters:
        activation - the activation that should be removed from the conflict set
        Returns:
        true, if the conflict set changed
      • addActivation

        protected boolean addActivation​(Activation<?> activation,
                                        java.lang.Integer priority)
        Since:
        2.0
      • removeActivation

        protected boolean removeActivation​(Activation<?> activation,
                                           java.lang.Integer priority)
        Since:
        2.0
      • setPriority

        protected void setPriority​(RuleSpecification<?> specification,
                                   int priority)
      • getNextActivations

        public java.util.Set<Activation<?>> getNextActivations()
        Returns the set of activations of rules with the lowest priority.
        Specified by:
        getNextActivations in interface ConflictSet
      • getRulePriority

        protected java.lang.Integer getRulePriority​(Activation<?> activation)
      • getRulePriority

        protected java.lang.Integer getRulePriority​(RuleSpecification<?> specification)