private boolean precedes(final String symbol1, final String symbol2) {
    String sym1 = symbol1.toLowerCase(Locale.ENGLISH);
    String sym2 = symbol2.toLowerCase(Locale.ENGLISH);

    if (!precedenceMap.keySet().contains(sym1)) {
      return false;
    }

    if (!precedenceMap.keySet().contains(sym2)) {
      return false;
    }

    int index1 = precedenceMap.get(sym1).intValue();
    int index2 = precedenceMap.get(sym2).intValue();

    boolean precedesResult = (index1 < index2);

    return precedesResult;
  }
Determines whether one symbol precedes another.

@param symbol1 symbol 1
@param symbol2 symbol 2
@return true if symbol 1 precedes symbol 2
olv-core/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/rule/InFixToPostFix.java