/** * 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); }
@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); }
/** * 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); }
@Override public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) { return marshalValue(env, ctx, expr.eval(env, VHelper.noCtx()).getOne(), expectedClass); }
/** * 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); }
@Override public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) { return new Long(expr.evalLong(env, VHelper.noCtx()).getOne()); }