code: public static Rule getRule(final String inequalitySymbol,
                               final Stack stack) {
        if (stack.size() < 2) {
            throw new IllegalArgumentException("Invalid " + inequalitySymbol
                    + " rule - expected two parameters but received "
                    + stack.size());
        } 
  
        String p2 = stack.pop().toString();
        String p1 = stack.pop().toString();
        return getRule(inequalitySymbol, p1, p2);
    }
docs: Create new instance from top two elements on stack.
  @param inequalitySymbol inequality symbol.
  @param stack stack.
  @return rule.