org.apache.poi.hssf.record.formula.eval
Class AddEval
java.lang.Object
org.apache.poi.hssf.record.formula.eval.AddEval
- All Implemented Interfaces:
- Eval, OperationEval
public final class AddEval
- extends java.lang.Object
- Author:
- Amol S. Deshmukh < amolweb at ya hoo dot com >
This is a documentation of the observed behaviour of
the '+' operator in Excel:
- 1+TRUE = 2
- 1+FALSE = 1
- 1+"true" = #VALUE!
- 1+"1" = 2
- 1+A1 = #VALUE if A1 contains "1"
- 1+A1 = 2 if A1 contains ="1"
- 1+A1 = 2 if A1 contains TRUE or =TRUE
- 1+A1 = #VALUE! if A1 contains "TRUE" or ="TRUE"
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final OperationEval instance
evaluate
protected double evaluate(double d0,
double d1)
getType
public final int getType()
- Specified by:
getType
in interface OperationEval
singleOperandEvaluate
protected final double singleOperandEvaluate(Eval arg,
int srcCellRow,
short srcCellCol)
throws EvaluationException
- Throws:
EvaluationException
evaluate
public final Eval evaluate(Eval[] args,
int srcCellRow,
short srcCellCol)
- Specified by:
evaluate
in interface OperationEval
getNumberOfOperands
public final int getNumberOfOperands()
- Specified by:
getNumberOfOperands
in interface OperationEval
Copyright 2008 The Apache Software Foundation or
its licensors, as applicable.