org.apache.log4j.rule
Class InFixToPostFix
java.lang.Object
org.apache.log4j.rule.InFixToPostFix
public class InFixToPostFix
- extends java.lang.Object
A helper class which converts infix expressions to postfix expressions
Currently grouping is supported, as well as all of the
Rules supported by RuleFactory
Supports grouping via parens, mult-word operands using single or double quotes,
and these operators:
! NOT operator
!= NOT EQUALS operator
== EQUALS operator
~= CASE-INSENSITIVE equals operator
|| OR operator
&& AND operator
like REGEXP operator
exists NOT NULL operator
< LESS THAN operator
> GREATER THAN operator
<= LESS THAN EQUALS operator
>= GREATER THAN EQUALS operator
- Author:
- Scott Deboy (sdeboy@apache.org)
Method Summary |
java.lang.String |
convert(java.lang.String expression)
Convert in-fix expression to post-fix. |
static boolean |
isOperand(java.lang.String s)
Evaluates whether symbol is operand. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InFixToPostFix
public InFixToPostFix()
convert
public java.lang.String convert(java.lang.String expression)
- Convert in-fix expression to post-fix.
- Parameters:
expression
- in-fix expression.
- Returns:
- post-fix expression.
isOperand
public static boolean isOperand(java.lang.String s)
- Evaluates whether symbol is operand.
- Parameters:
s
- symbol.
- Returns:
- true if operand.
Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.