本文整理汇总了Java中com.espertech.esper.type.BitWiseOpEnum.BAND属性的典型用法代码示例。如果您正苦于以下问题:Java BitWiseOpEnum.BAND属性的具体用法?Java BitWiseOpEnum.BAND怎么用?Java BitWiseOpEnum.BAND使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.espertech.esper.type.BitWiseOpEnum
的用法示例。
在下文中一共展示了BitWiseOpEnum.BAND属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetType
public void testGetType() throws Exception {
log.debug(".testGetType");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(Double.class));
_bitWiseNode.addChildNode(new SupportExprNode(Integer.class));
try {
_bitWiseNode.validate(SupportExprValidationContextFactory.makeEmpty());
fail();
} catch (ExprValidationException ex) {
// Expected
}
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(Long.class));
_bitWiseNode.addChildNode(new SupportExprNode(Long.class));
ExprNodeUtilityRich.getValidatedSubtree(ExprNodeOrigin.SELECT, _bitWiseNode, SupportExprValidationContextFactory.makeEmpty());
assertEquals(Long.class, _bitWiseNode.getForge().getEvaluationType());
}
示例2: testGetType
public void testGetType() throws Exception
{
log.debug(".testGetType");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(Double.class));
_bitWiseNode.addChildNode(new SupportExprNode(Integer.class));
try
{
_bitWiseNode.validate(ExprValidationContextFactory.makeEmpty());
fail();
}
catch (ExprValidationException ex)
{
// Expected
}
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(Long.class));
_bitWiseNode.addChildNode(new SupportExprNode(Long.class));
ExprNodeUtility.getValidatedSubtree(_bitWiseNode, ExprValidationContextFactory.makeEmpty());
assertEquals(Long.class, _bitWiseNode.getType());
}
示例3: testToExpressionString
public void testToExpressionString() throws Exception {
log.debug(".testToExpressionString");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(4));
_bitWiseNode.addChildNode(new SupportExprNode(2));
assertEquals("4&2", ExprNodeUtilityCore.toExpressionStringMinPrecedenceSafe(_bitWiseNode));
}
示例4: testEqualsNode
public void testEqualsNode() throws Exception
{
log.debug(".testEqualsNode");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
assertTrue(_bitWiseNode.equalsNode(_bitWiseNode));
assertFalse(_bitWiseNode.equalsNode(new ExprBitWiseNode(BitWiseOpEnum.BXOR)));
}
示例5: testToExpressionString
public void testToExpressionString() throws Exception
{
log.debug(".testToExpressionString");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
_bitWiseNode.addChildNode(new SupportExprNode(4));
_bitWiseNode.addChildNode(new SupportExprNode(2));
assertEquals("(4&2)", _bitWiseNode.toExpressionString());
}
示例6: setUp
public void setUp() {
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
}
示例7: testEqualsNode
public void testEqualsNode() throws Exception {
log.debug(".testEqualsNode");
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
assertTrue(_bitWiseNode.equalsNode(_bitWiseNode, false));
assertFalse(_bitWiseNode.equalsNode(new ExprBitWiseNode(BitWiseOpEnum.BXOR), false));
}
示例8: binaryAnd
/**
* Bitwise (binary) AND.
* @return expression
*/
public static BitwiseOpExpression binaryAnd()
{
return new BitwiseOpExpression(BitWiseOpEnum.BAND);
}
示例9: setUp
public void setUp()
{
_bitWiseNode = new ExprBitWiseNode(BitWiseOpEnum.BAND);
}
示例10: binaryAnd
/**
* Bitwise (binary) AND.
*
* @return expression
*/
public static BitwiseOpExpression binaryAnd() {
return new BitwiseOpExpression(BitWiseOpEnum.BAND);
}