/**
   * This method is used to pass an algorithm decorator factory that is used for tracing (for
   * example). See {@link #checkedRules(Object, Object[], IRuntimeEnv)} for full documentation
   *
   * @param target target object
   * @param params parameters of a test
   * @param env environment
   * @param decoratorFactory a decorator factory that will decorate an objects that are used to
   *     calculate a rule
   * @return iterator over <b>rule indexes</b> - integer iterator.
   * @see #checkedRules(Object, Object[], IRuntimeEnv)
   */
  protected final IIntIterator checkedRules(
      Object target,
      Object[] params,
      IRuntimeEnv env,
      DefaultAlgorithmDecoratorFactory decoratorFactory) {

    // Select rules set using indexed mode
    //
    //        ICondition[] conditions = table.getConditionRows();

    IIntIterator iterator = null;
    int conditionNumber = info.fromCondition;

    if (indexRoot == null) {
      iterator = info.makeRuleIterator();
    } else {

      ARuleIndex index = indexRoot;

      for (; conditionNumber <= info.toCondition; conditionNumber++) {
        index = decoratorFactory.create(index, table.getCondition(conditionNumber));

        Object testValue =
            evaluateTestValue(table.getCondition(conditionNumber), target, params, env);

        DecisionTableRuleNode node = index.findNode(testValue);

        if (!node.hasIndex()) {
          iterator = node.getRulesIterator();
          conditionNumber += 1;
          break;
        }

        index = node.getNextIndex();
      }
    }

    for (; conditionNumber <= info.toCondition; conditionNumber++) {

      ICondition condition = table.getCondition(conditionNumber);
      IConditionEvaluator evaluator = evaluators[conditionNumber];

      IIntSelector sel = evaluator.getSelector(condition, target, params, env);
      sel = decoratorFactory.create(sel, condition);

      iterator = iterator.select(sel);
    }

    return iterator;
  }
 @Override
 public IDomain<? extends Object> getConditionParameterDomain(
     int paramIdx, IBaseCondition condition) throws DomainCanNotBeDefined {
   return decorate.getConditionParameterDomain(paramIdx, condition);
 }
 @Override
 public IOpenSourceCodeModule getFormalSourceCode(IBaseCondition condition) {
   return decorate.getFormalSourceCode(condition);
 }
 @Override
 public String getOptimizedSourceCode() {
   return decorate.getOptimizedSourceCode();
 }
 @Override
 public IDomain<? extends Object> getRuleParameterDomain(IBaseCondition condition)
     throws DomainCanNotBeDefined {
   return decorate.getRuleParameterDomain(condition);
 }
 @Override
 public IIntSelector getSelector(
     ICondition condition, Object target, Object[] dtparams, IRuntimeEnv env) {
   return decorate.getSelector(condition, target, dtparams, env);
 }
 @Override
 public void setOptimizedSourceCode(String code) {
   decorate.setOptimizedSourceCode(code);
 }