public static Rule getRule(final Stack<Object> stack) {
    if (stack.size() < 2) {
      throw new IllegalArgumentException("Invalid EQUALS rule - expected two parameters but received " + stack.size());
    }

    String p2 = stack.pop().toString();
    String p1 = stack.pop().toString();

    return getRule(p1, p2);
  }
Create new instance from top two elements of stack.

@param stack stack
@return new instance
olv-core/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/rule/EqualsRule.java