use of io.atlasmap.v2.Expression in project shifu by ShifuML.
the class JexlTest method testJavaExpressionNotNull.
@Test
public void testJavaExpressionNotNull() {
JexlEngine jexl = new JexlEngine();
String jexlExp = "bad_num != \"NULL\"";
Expression e = jexl.createExpression(jexlExp);
JexlContext jc = new MapContext();
jc.set("bad_num", "2");
// Now evaluate the expression, getting the result
Boolean isEqual = (Boolean) e.evaluate(jc);
Assert.assertTrue(isEqual);
jc = new MapContext();
jc.set("bad_num", "NULL");
// Now evaluate the expression, getting the result
isEqual = (Boolean) e.evaluate(jc);
Assert.assertFalse(isEqual);
}
use of io.atlasmap.v2.Expression in project xtext-core by eclipse.
the class Expression_Larger_EqualImpl method basicSetLeft.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
Expression oldLeft = left;
left = newLeft;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_LARGER_EQUAL__LEFT, oldLeft, newLeft);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of io.atlasmap.v2.Expression in project xtext-core by eclipse.
the class Expression_SmallerImpl method basicSetLeft.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
Expression oldLeft = left;
left = newLeft;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_SMALLER__LEFT, oldLeft, newLeft);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of io.atlasmap.v2.Expression in project xtext-core by eclipse.
the class Expression_Not_EqualImpl method basicSetLeft.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
Expression oldLeft = left;
left = newLeft;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_NOT_EQUAL__LEFT, oldLeft, newLeft);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of io.atlasmap.v2.Expression in project xtext-core by eclipse.
the class Expression_Not_LessImpl method basicSetLeft.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
Expression oldLeft = left;
left = newLeft;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_NOT_LESS__LEFT, oldLeft, newLeft);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations