_trigger_consumer.consumeUpdateTrigger( but );
_trigger_consumer.consumeUpdateTrigger( but ); else { if (logger.isDetailEnabled() ) logger.detail ("Leashing Enabled: tigger ignored."); }
    private void handleUpdateTriggers()    {     BeliefUpdateTrigger but = null;     Iterator iter;        // Diagnoses are published to the blackboard. Each sensor has     // a Diagnosis object on the blackboard that it either asserts     // periodically or asserts when some value changes (or both).     // The Believability plugin receives a wrapped version of this     // object on the blackboard, when something changes.     //     // Successful actions are published to the blackboard by the      // actuators, at the time of success          // ------- ADD UpdateTrigger     for ( iter = _beliefUpdateTriggerSub.getAddedCollection().iterator();                iter.hasNext() ; ) {         if (logger.isDetailEnabled() ) logger.detail ("UpdateTrigger ADD");         try {          // This is for leashing of diagnoses, to be sure that the          // LeashRequestDiagnosis is propagated both when it enables          // and when it disables the defense controller          _dc_enabled_new = _dc_enabled;          but = constructUpdateTrigger( (Object) iter.next() );                    // Check to see whether the defense controller is enabled at          // the moment          if (_dc_enabled)            _trigger_consumer.consumeUpdateTrigger( but );          _dc_enabled = _dc_enabled_new;         }         catch ( BelievabilityException be ) {             if (logger.isWarnEnabled() )                  logger.warn( "Problem processing added trigger "                              + be.getMessage() );         }     } // iterator for ADD update trigger     // ------- CHANGE UpdateTrigger     for ( iter = _beliefUpdateTriggerSub.getChangedCollection().iterator();           iter.hasNext() ; ) {         if (logger.isDetailEnabled() ) logger.detail ("UpdateTrigger CHANGE");         try {          // This is for leashing of diagnoses, to be sure that the          // LeashRequestDiagnosis is propagated both when it enables          // and when it disables the defense controller          _dc_enabled_new = _dc_enabled;          but = constructUpdateTrigger( (Object) iter.next() );          // Check to see whether the defense controller is enabled at          // the moment          if (_dc_enabled)            _trigger_consumer.consumeUpdateTrigger( but );                    _dc_enabled = _dc_enabled_new;         }         catch ( BelievabilityException be ) {             if ( logger.isWarnEnabled())           logger.warn( "Problem processing changed update trigger "                    + be.getMessage() );         }     } // iterator for CHANGE UpdateTrigger             // ----- REMOVE UpdateTrigger     // The trigger has been removed successfully,     // we do nothing with this since it is controlled elsewhere, and     // we have already processed it.     for ( iter = _beliefUpdateTriggerSub.getRemovedCollection().iterator();            iter.hasNext() ; ) {         Object o = iter.next();         // do absolutely nothing     } // for REMOVE UpdateTrigger         } // method handleUpdateTriggers