public static Rule getRule(final Stack<Object> stack) {
    if (stack.size() < 1) {
      throw new IllegalArgumentException("Invalid NOT rule - expected one rule but received " + stack.size());
    }
    Object o1 = stack.pop();
    if (o1 instanceof Rule) {
      Rule p1 = (Rule) o1;
      return new NotRule(p1);
    }
    throw new IllegalArgumentException("Invalid NOT rule: - expected rule but received " + o1);
  }
Create new instance from top element of stack.

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