@Test public void testEvaluate1() { Map<String, Object> values = new HashMap<String, Object>(); values.put("a", 1); values.put("b", 1); values.put("c", null); IEvent event = new TupleEvent("stream", "schemName", values, eventTypeMng); PropertyIsNullExpression propertyIsNullExpression = new PropertyIsNullExpression("c", String.class); Object actualResult = propertyIsNullExpression.evaluate(event); Assert.assertTrue((Boolean)actualResult); }
@Override public Boolean evaluate(IEvent theEvent) { if (null == theEvent) { throw new RuntimeException("theEvent is null!"); } String propertyName = getPropertyName(); Object propertyValue = theEvent.getValue(propertyName); return null == propertyValue; }
PropertyIsNullExpression extends PropertyBasedExpression implements IBooleanExpression { @Override public Boolean evaluate(IEvent theEvent) { if (null == theEvent) { throw new RuntimeException("theEvent is null!"); } String propertyName = getPropertyName(); Object propertyValue = theEvent.getValue(propertyName); return null == propertyValue; } }
PropertyIsNullExpression extends PropertyBasedExpression implements IBooleanExpression { @Override public Boolean evaluate(IEvent theEvent) { if (null == theEvent) { throw new RuntimeException("theEvent is null!"); } String propertyName = getPropertyName(); Object propertyValue = theEvent.getValue(propertyName); return null == propertyValue; } PropertyIsNullExpression(int id, String propertyName, Class< ? > type);  PropertyIsNullExpression(String propertyName, Class< ? > type); }
PropertyIsNullExpression extends PropertyBasedExpression implements IBooleanExpression { @Override public Boolean evaluate(IEvent theEvent) { if (null == theEvent) { throw new RuntimeException("theEvent is null!"); } String propertyName = getPropertyName(); Object propertyValue = theEvent.getValue(propertyName); return null == propertyValue; } PropertyIsNullExpression(int id, String propertyName, Class< ? > type);  PropertyIsNullExpression(String propertyName, Class< ? > type); @Override Boolean evaluate(IEvent theEvent); @Override Object evaluate(IEvent[] eventsPerStream); @Override Class< ? > getType(); }
PropertyIsNullExpression extends PropertyBasedExpression implements IBooleanExpression { @Override public Boolean evaluate(IEvent theEvent) { if (null == theEvent) { throw new RuntimeException("theEvent is null!"); } String propertyName = getPropertyName(); Object propertyValue = theEvent.getValue(propertyName); return null == propertyValue; } PropertyIsNullExpression(int id, String propertyName, Class< ? > type);  PropertyIsNullExpression(String propertyName, Class< ? > type); @Override Boolean evaluate(IEvent theEvent); @Override Object evaluate(IEvent[] eventsPerStream); @Override Class< ? > getType();  }