当前位置: 首页>>代码示例>>Java>>正文


Java Token.MULT属性代码示例

本文整理汇总了Java中org.javarosa.xpath.parser.Token.MULT属性的典型用法代码示例。如果您正苦于以下问题:Java Token.MULT属性的具体用法?Java Token.MULT怎么用?Java Token.MULT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.javarosa.xpath.parser.Token的用法示例。


在下文中一共展示了Token.MULT属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBinOpExpr

private XPathBinaryOpExpr getBinOpExpr (int op, XPathExpression a, XPathExpression b) throws XPathSyntaxException {
	switch (op) {
	case Token.OR: return new XPathBoolExpr(XPathBoolExpr.OR, a, b);
	case Token.AND: return new XPathBoolExpr(XPathBoolExpr.AND, a, b);
	case Token.EQ: return new XPathEqExpr(true, a, b);
	case Token.NEQ: return new XPathEqExpr(false, a, b);
	case Token.LT: return new XPathCmpExpr(XPathCmpExpr.LT, a, b);
	case Token.LTE: return new XPathCmpExpr(XPathCmpExpr.LTE, a, b);
	case Token.GT: return new XPathCmpExpr(XPathCmpExpr.GT, a, b);
	case Token.GTE: return new XPathCmpExpr(XPathCmpExpr.GTE, a, b);
	case Token.PLUS: return new XPathArithExpr(XPathArithExpr.ADD, a, b);
	case Token.MINUS: return new XPathArithExpr(XPathArithExpr.SUBTRACT, a, b);
	case Token.MULT: return new XPathArithExpr(XPathArithExpr.MULTIPLY, a, b);
	case Token.DIV: return new XPathArithExpr(XPathArithExpr.DIVIDE, a, b);
	case Token.MOD: return new XPathArithExpr(XPathArithExpr.MODULO, a, b);
	case Token.UNION: return new XPathUnionExpr(a, b);
	default: throw new XPathSyntaxException();
	}
}
 
开发者ID:medic,项目名称:javarosa,代码行数:19,代码来源:ASTNodeBinaryOp.java

示例2: getBinOpExpr

private XPathBinaryOpExpr getBinOpExpr(int op, XPathExpression a, XPathExpression b) throws XPathSyntaxException {
    switch (op) {
        case Token.OR:
            return new XPathBoolExpr(XPathBoolExpr.OR, a, b);
        case Token.AND:
            return new XPathBoolExpr(XPathBoolExpr.AND, a, b);
        case Token.EQ:
            return new XPathEqExpr(XPathEqExpr.EQ, a, b);
        case Token.NEQ:
            return new XPathEqExpr(XPathEqExpr.NEQ, a, b);
        case Token.LT:
            return new XPathCmpExpr(XPathCmpExpr.LT, a, b);
        case Token.LTE:
            return new XPathCmpExpr(XPathCmpExpr.LTE, a, b);
        case Token.GT:
            return new XPathCmpExpr(XPathCmpExpr.GT, a, b);
        case Token.GTE:
            return new XPathCmpExpr(XPathCmpExpr.GTE, a, b);
        case Token.PLUS:
            return new XPathArithExpr(XPathArithExpr.ADD, a, b);
        case Token.MINUS:
            return new XPathArithExpr(XPathArithExpr.SUBTRACT, a, b);
        case Token.MULT:
            return new XPathArithExpr(XPathArithExpr.MULTIPLY, a, b);
        case Token.DIV:
            return new XPathArithExpr(XPathArithExpr.DIVIDE, a, b);
        case Token.MOD:
            return new XPathArithExpr(XPathArithExpr.MODULO, a, b);
        case Token.UNION:
            return new XPathUnionExpr(a, b);
        default:
            throw new XPathSyntaxException();
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:34,代码来源:ASTNodeBinaryOp.java


注:本文中的org.javarosa.xpath.parser.Token.MULT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。