Examples of ValueEval


Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class True implements Function {

    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
        ValueEval retval;
        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 0:
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Sumxmy2 extends XYNumericFunction {

   
    public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
        ValueEval retval = null;
        double[][] values = null;
       
        int checkLen = 0; // check to see that all array lengths are equal
        switch (operands.length) {
        default:
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

* </ol>
*/
public abstract class BooleanFunction implements Function {

    protected ValueEval singleOperandEvaluate(Eval eval, int srcRow, short srcCol, boolean stringsAreBlanks) {
        ValueEval retval;
       
        if (eval instanceof RefEval) {
            RefEval re = (RefEval) eval;
            ValueEval ve = re.getInnerValueEval();
            retval = internalResolve(ve, true);
        }
        else {
            retval = internalResolve(eval, stringsAreBlanks);
        }
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

       
        return retval;
    }
   
    private ValueEval internalResolve(Eval ve, boolean stringsAreBlanks) {
        ValueEval retval = null;
       
        // blankeval is returned as is
        if (ve instanceof BlankEval) {
            retval = BlankEval.INSTANCE;
        }
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

        return DEFAULT_NUM_XLATOR;
    }

   
    public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
        ValueEval retval = null;
        double[] values = getNumberArray(operands, srcCellRow, srcCellCol);
        if (values == null) {
            retval = ErrorEval.VALUE_INVALID;
        }
        else {
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Sign extends NumericFunction {
   
    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
        double d = 0;
        ValueEval retval = null;
       
        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 1:
            ValueEval ve = singleOperandEvaluate(operands[0], srcRow, srcCol);
            if (ve instanceof NumericValueEval) {
                NumericValueEval ne = (NumericValueEval) ve;
                d = ne.getNumberValue();
            }
            else if (ve instanceof BlankEval) {
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Sin extends NumericFunction {

    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
        double d = 0;
        ValueEval retval = null;

        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 1:
            ValueEval ve = singleOperandEvaluate(operands[0], srcRow, srcCol);
            if (ve instanceof NumericValueEval) {
                NumericValueEval ne = (NumericValueEval) ve;
                d = ne.getNumberValue();
            }
            else if (ve instanceof BlankEval) {
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Degrees extends NumericFunction {
   
    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
        double d = 0;
        ValueEval retval = null;
       
        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 1:
            ValueEval ve = singleOperandEvaluate(operands[0], srcRow, srcCol);
            if (ve instanceof NumericValueEval) {
                NumericValueEval ne = (NumericValueEval) ve;
                d = ne.getNumberValue();
            }
            else if (ve instanceof BlankEval) {
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Tanh extends NumericFunction {

    public Eval evaluate(Eval[] operands, int srcRow, short srcCol) {
        double d = 0;
        ValueEval retval = null;

        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 1:
            ValueEval ve = singleOperandEvaluate(operands[0], srcRow, srcCol);
            if (ve instanceof NumericValueEval) {
                NumericValueEval ne = (NumericValueEval) ve;
                d = ne.getNumberValue();
            }
            else if (ve instanceof BlankEval) {
View Full Code Here

Examples of org.apache.poi.hssf.record.formula.eval.ValueEval

*/
public class Len extends TextFunction {


    public Eval evaluate(Eval[] operands, int srcCellRow, short srcCellCol) {
        ValueEval retval = null;
        String s = null;
       
        switch (operands.length) {
        default:
            retval = ErrorEval.VALUE_INVALID;
            break;
        case 1:
            ValueEval ve = singleOperandEvaluate(operands[0], srcCellRow, srcCellCol);
            if (ve instanceof StringValueEval) {
                StringValueEval sve = (StringValueEval) ve;
                s = sve.getStringValue();
            }
            else if (ve instanceof RefEval) {
                RefEval re = (RefEval) ve;
                ValueEval ive = re.getInnerValueEval();
                if (ive instanceof BlankEval) {
                    s = re.isEvaluated() ? "0" : null;
                }
                else if (ive instanceof StringValueEval) {
                    s = ((StringValueEval) ive).getStringValue();
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.