Examples of Expr


Examples of org.boris.expr.Expr

            return ((ExprNumber)arg).intValue();
        return defaultValue;
    }
   
    protected double asDouble(Expr[] args, int index, double defaultValue) throws ExprException {
        Expr arg = getArg(args, index);
        if(arg instanceof ExprNumber)
            return ((ExprNumber)arg).doubleValue();
        return defaultValue;
    }
View Full Code Here

Examples of org.boris.expr.Expr

   
    protected Expr getArg(Expr[] args, int index) throws ExprException {
        if(args == null || args.length <= index)
            return null;
       
        Expr arg = args[index];
        if(arg instanceof ExprArray) {
            arg = ((ExprArray)arg).get(0);
        }
        if (arg instanceof ExprEvaluatable) {
            arg = ((ExprEvaluatable) arg).evaluate();
View Full Code Here

Examples of org.boris.expr.Expr

    protected double asDouble(ExprArray knownY, int index) throws ExprException {
        if (index < 0 || index >= knownY.length())
            return 0;

        Expr e = knownY.get(index);
        return asDouble(e, false);
    }
View Full Code Here

Examples of org.boris.expr.Expr

            return vectorLookup(args);
        }
    }

    public static Expr vectorLookup(Expr[] args) throws ExprException {
        Expr ev = evalArg(args[0]);
        Expr el = evalArg(args[1]);
        Expr er = evalArg(args[2]);
        return null;
    }
View Full Code Here

Examples of org.boris.expr.Expr

            }

            return ExprError.NAME;
        }

        Expr a = args[0];
        if (a instanceof ExprEvaluatable) {
            a = ((ExprEvaluatable) a).evaluate();
        }

        if (a instanceof ExprInteger || a instanceof ExprDouble) {
View Full Code Here

Examples of org.boris.expr.Expr

public class TIME extends AbstractFunction
{
    public Expr evaluate(Expr[] args) throws ExprException {
        assertArgCount(args, 3);
        Expr eH = evalArg(args[0]);
        if (!isNumber(eH))
            return ExprError.VALUE;
        double h = ((ExprNumber) eH).doubleValue();
        Expr eM = evalArg(args[1]);
        if (!isNumber(eM))
            return ExprError.VALUE;
        double m = ((ExprNumber) eM).doubleValue();
        Expr eS = evalArg(args[1]);
        if (!isNumber(eS))
            return ExprError.VALUE;
        double s = ((ExprNumber) eS).doubleValue();
        double r = ExcelDate.time(h, m, s);
        if (r < 0)
View Full Code Here

Examples of org.boris.expr.Expr

public class ISERR extends AbstractFunction
{
    public Expr evaluate(Expr[] args) throws ExprException {
        assertArgCount(args, 1);
        Expr e = evalArg(args[0]);
        return bool(e instanceof ExprError);
    }
View Full Code Here

Examples of org.boris.expr.Expr

        }
        return e;
    }

    public static Expr parseValue(String expression) {
        Expr result;
        try {
            result = new ExprInteger(Integer.parseInt(expression));
        } catch (Exception e) {
            try {
                result = new ExprDouble(Double.parseDouble(expression));
View Full Code Here

Examples of org.jaxen.expr.Expr

    }

    public void endFilterExpr() throws JaxenException
    {
        //System.err.println("endFilterExpr()");
        Expr expr = (Expr) peekFrame().removeFirst();
       
        FilterExpr filter = getXPathFactory().createFilterExpr( expr );

        Iterator predIter = popFrame().iterator();
View Full Code Here

Examples of org.jbpm.ui.bsh.BSHValidationModel.Expr

            String textData = configParams.get(ValidatorDefinition.EXPRESSION_PARAM_NAME);
            if (textData == null) {
                textData = "";
            }
            try {
                Expr expr = BSHValidationModel.fromCode(textData, allVariables);
                if (expr != null) {
                    Variable variable = expr.getVar1();
                    if (variableNames.contains(variable.getName())) {
                        comboBoxVar1.setText(variable.getName());
                        comboBoxVar1.setData(variable);
                        refreshCombos();

                        comboBoxOp.setText(expr.getOperation().getVisibleName());
                        comboBoxVar2.setText(expr.getVar2().getName());
                        textData = expr.generateCode();
                    }
                }
            } catch (Exception e) {
                tabFolder.setSelection(1);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.