Examples of ErrorEval


Examples of org.apache.poi.ss.formula.eval.ErrorEval

  private double evaluateInternal(ValueVector x, ValueVector y, int size)
      throws EvaluationException {
    Accumulator acc = createAccumulator();

    // error handling is as if the x is fully evaluated before y
    ErrorEval firstXerr = null;
    ErrorEval firstYerr = null;
    boolean accumlatedSome = false;
    double result = 0.0;

    for (int i = 0; i < size; i++) {
      ValueEval vx = x.getItem(i);
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

    Double doubleVal = OperandResolver.parseDouble(value);
    if(doubleVal != null) {
      return new NumberMatcher(doubleVal.doubleValue(), operator);
    }
    ErrorEval ee = parseError(value);
    if (ee != null) {
      return new ErrorMatcher(ee.getErrorCode(), operator);
    }

    //else - just a plain string with no interpretation.
    return new StringMatcher(value, operator);
  }
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

 
  private double evaluateInternal(ValueVector x, ValueVector y, int size)
      throws EvaluationException {

    // error handling is as if the x is fully evaluated before y
    ErrorEval firstXerr = null;
    ErrorEval firstYerr = null;
    boolean accumlatedSome = false;
    double result = 0.0;
        // first pass: read in data, compute xbar and ybar
        double sumx = 0.0, sumy = 0.0;
       
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

  private double evaluateInternal(ValueVector x, ValueVector y, int size)
      throws EvaluationException {
    Accumulator acc = createAccumulator();

    // error handling is as if the x is fully evaluated before y
    ErrorEval firstXerr = null;
    ErrorEval firstYerr = null;
    boolean accumlatedSome = false;
    double result = 0.0;

    for (int i = 0; i < size; i++) {
      ValueEval vx = x.getItem(i);
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

    Double doubleVal = OperandResolver.parseDouble(value);
    if(doubleVal != null) {
      return new NumberMatcher(doubleVal.doubleValue(), operator);
    }
    ErrorEval ee = parseError(value);
    if (ee != null) {
      return new ErrorMatcher(ee.getErrorCode(), operator);
    }

    //else - just a plain string with no interpretation.
    return new StringMatcher(value, operator);
  }
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

        new NumberEval(24),
        new NumberEval(1000),
    };
    ValueEval ev = invoke(args);
    if(ev instanceof ErrorEval) {
      ErrorEval err = (ErrorEval) ev;
      if(err.getErrorCode() == HSSFErrorConstants.ERROR_VALUE) {
        throw new AssertionFailedError("Identified bug 44691");
      }
    }

    confirm(-44.3206, invokeNormal(args));
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

      }
      if (value == BlankEval.instance) {
        return "#BLANK#";
      }
      if (value instanceof ErrorEval) {
        ErrorEval ee = (ErrorEval) value;
        return ErrorEval.getText(ee.getErrorCode());
      }
      throw new IllegalArgumentException("Unexpected value class ("
          + value.getClass().getName() + ")");
    }
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

      }
      if (value == BlankEval.instance) {
        return "#BLANK#";
      }
      if (value instanceof ErrorEval) {
        ErrorEval ee = (ErrorEval) value;
        return ErrorEval.getText(ee.getErrorCode());
      }
      throw new IllegalArgumentException("Unexpected value class ("
          + value.getClass().getName() + ")");
    }
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

    Double doubleVal = OperandResolver.parseDouble(value);
    if(doubleVal != null) {
      return new NumberMatcher(doubleVal.doubleValue(), operator);
    }
    ErrorEval ee = parseError(value);
    if (ee != null) {
      return new ErrorMatcher(ee.getErrorCode(), operator);
    }

    //else - just a plain string with no interpretation.
    return new StringMatcher(value, operator);
  }
View Full Code Here

Examples of org.apache.poi.ss.formula.eval.ErrorEval

        assertEquals(expectedResult, result.getNumberValue());
    }
   
    public void testEDateInvalidValues() {
        EDate eDate = new EDate();
        ErrorEval result = (ErrorEval) eDate.evaluate(new ValueEval[]{new NumberEval(1000)}, null);
        assertEquals(ErrorConstants.ERROR_VALUE, result.getErrorCode());
    }
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.