本文整理匯總了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();
}
}
示例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();
}
}