@Test public void testEvaluate4() throws IllegalDataTypeException { RelationExpression relationExpression = new RelationExpression(ExpressionOperator.LESSTHAN_EQUAL, new ConstExpression(SupportConst.I_TWO), new ConstExpression(SupportConst.I_THREE)); IEvent event = new TupleEvent(); Object actualResult = relationExpression.evaluate(event); Assert.assertTrue((Boolean)actualResult); }
@Override public Object evaluate(IEvent theEvent) { if (theEvent == null) { throw new IllegalArgumentException("event == null"); } Object lo = this.getLeftExpr().evaluate(theEvent); Object ro = this.getRightExpr().evaluate(theEvent); return compute(lo, ro); }
RelationExpression extends OperatorBasedExpression implements IBooleanExpression { @Override public Object evaluate(IEvent theEvent) { if (theEvent == null) { throw new IllegalArgumentException("event == null"); } Object lo = this.getLeftExpr().evaluate(theEvent); Object ro = this.getRightExpr().evaluate(theEvent); return compute(lo, ro); } }
RelationExpression extends OperatorBasedExpression implements IBooleanExpression { @Override public Object evaluate(IEvent theEvent) { if (theEvent == null) { throw new IllegalArgumentException("event == null"); } Object lo = this.getLeftExpr().evaluate(theEvent); Object ro = this.getRightExpr().evaluate(theEvent); return compute(lo, ro); } RelationExpression(ExpressionOperator op, IExpression leftExpr, IExpression rightExpr); }
RelationExpression extends OperatorBasedExpression implements IBooleanExpression { @Override public Object evaluate(IEvent theEvent) { if (theEvent == null) { throw new IllegalArgumentException("event == null"); } Object lo = this.getLeftExpr().evaluate(theEvent); Object ro = this.getRightExpr().evaluate(theEvent); return compute(lo, ro); } RelationExpression(ExpressionOperator op, IExpression leftExpr, IExpression rightExpr); @Override Object evaluate(IEvent theEvent); @Override Object evaluate(IEvent[] eventsPerStream); void setType(Class< ? > type); Class< ? > validateType(); }
RelationExpression extends OperatorBasedExpression implements IBooleanExpression { @Override public Object evaluate(IEvent theEvent) { if (theEvent == null) { throw new IllegalArgumentException("event == null"); } Object lo = this.getLeftExpr().evaluate(theEvent); Object ro = this.getRightExpr().evaluate(theEvent); return compute(lo, ro); } RelationExpression(ExpressionOperator op, IExpression leftExpr, IExpression rightExpr); @Override Object evaluate(IEvent theEvent); @Override Object evaluate(IEvent[] eventsPerStream); void setType(Class< ? > type); Class< ? > validateType();  }