code: public Rule getRule(int id) {
      Rule returnRule = null;
      for (Rule rule : this.getRules().getRule()) {
        if (rule.getId() == id) {
          returnRule = rule;
          break;
        }
      }
      return returnRule;
    }
docs: Gets a rule by its id.
  
  @param id
  the id of the rule
  @param rereadRules
  states if the rules must be read from the file or to reuse the
  in-memory representation, if it already exists
  @return the rule