示例#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);
 }
示例#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);
  }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#6
0
 @Override
 public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) {
   return new Long(expr.evalLong(env, VHelper.noCtx()).getOne());
 }