code: public static Rule getRule(final String inequalitySymbol,
                                 final String value) {
  
          Level thisLevel;
  
          //if valid util.logging levels are used against events
          // with log4j levels, the
          //DEBUG level is used and an illegalargumentexception won't be generated
  
          //an illegalargumentexception is only generated
          // if the user types a level name
          //that doesn't exist as either a log4j or util.logging level name
          if (levelList.contains(value.toUpperCase())) {
              thisLevel = Level.toLevel(value.toUpperCase());
          } else if (utilLoggingLevelList.contains(value.toUpperCase())) {
              thisLevel = UtilLoggingLevel.toLevel(value.toUpperCase());
          } else {
              throw new IllegalArgumentException(
                      "Invalid level inequality rule - " + value
                              + " is not a supported level");
          }
  
          if ("<".equals(inequalitySymbol)) {
              return new LessThanRule(thisLevel);
          }
          if (">".equals(inequalitySymbol)) {
              return new GreaterThanRule(thisLevel);
          }
          if ("<=".equals(inequalitySymbol)) {
              return new LessThanEqualsRule(thisLevel);
          }
          if (">=".equals(inequalitySymbol)) {
              return new GreaterThanEqualsRule(thisLevel);
          }
  
          return null;
      }
docs: Create new rule.
  @param inequalitySymbol inequality symbol.
  @param value Symbolic name of comparison level.
  @return instance of AbstractRule.