Example #1
0
 /**
  * Evaluates the expression.
  *
  * @param env the calling environment.
  * @param ctx
  * @return the expression value.
  */
 @Override
 @Nonnull
 protected V<? extends ValueOrVar> _eval(Env env, FeatureExpr ctx) {
   return VHelper.smapAll(
       ctx,
       _left.evalBoolean(env, ctx),
       _right.evalBoolean(env, ctx),
       (a, b) -> a != b ? BooleanValue.TRUE : BooleanValue.FALSE);
 }
Example #2
0
  @Override
  public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class argClass) {
    Value value = expr.eval(env, VHelper.noCtx()).getOne();

    return marshalValue(env, ctx, value, argClass);
  }
Example #3
0
 /**
  * Evaluates the expression.
  *
  * @param env the calling environment.
  * @param ctx
  * @return the expression value.
  */
 @Override
 @Nonnull
 protected V<? extends ValueOrVar> _eval(Env env, FeatureExpr ctx) {
   return VHelper.toV(_objValue);
 }
Example #4
0
 @Override
 public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) {
   return marshalValue(env, ctx, expr.eval(env, VHelper.noCtx()).getOne(), expectedClass);
 }
Example #5
0
 /**
  * Evaluates the expression.
  *
  * @param env the calling environment.
  * @param ctx
  * @return the expression value.
  */
 @Override
 public V<? extends Boolean> evalBoolean(Env env, FeatureExpr ctx) {
   return VHelper.smapAll(
       ctx, _left.evalBoolean(env, ctx), _right.evalBoolean(env, ctx), (a, b) -> a != b);
 }
Example #6
0
 @Override
 public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) {
   return new Long(expr.evalLong(env, VHelper.noCtx()).getOne());
 }