com.alibaba.rocketmq.common.filter.impl
类 PolishExpr

java.lang.Object
  继承者 com.alibaba.rocketmq.common.filter.impl.PolishExpr

public class PolishExpr
extends Object


构造方法摘要
PolishExpr()
           
 
方法摘要
static boolean isLeftParenthesis(Op token)
           
static boolean isOperand(Op token)
           
static boolean isOperator(Op token)
           
static boolean isRightParenthesis(Op token)
           
static List<Op> reversePolish(List<Op> tokens)
          将中缀表达式转换成逆波兰表达式
Shunting-yard algorithm
http://en.wikipedia.org/wiki/Shunting_yard_algorithm
static List<Op> reversePolish(String expression)
          将中缀表达式转换成逆波兰表达式
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

PolishExpr

public PolishExpr()
方法详细信息

reversePolish

public static List<Op> reversePolish(String expression)
将中缀表达式转换成逆波兰表达式

参数:
expression -
返回:

reversePolish

public static List<Op> reversePolish(List<Op> tokens)
将中缀表达式转换成逆波兰表达式
Shunting-yard algorithm
http://en.wikipedia.org/wiki/Shunting_yard_algorithm

参数:
tokens -
返回:

isOperand

public static boolean isOperand(Op token)

isOperator

public static boolean isOperator(Op token)

isLeftParenthesis

public static boolean isLeftParenthesis(Op token)

isRightParenthesis

public static boolean isRightParenthesis(Op token)


Copyright © 2012-2015. All Rights Reserved.