org.apache.poi.hssf.record.formula.eval
Class AddEval

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.eval.NumericOperationEval
      extended by org.apache.poi.hssf.record.formula.eval.AddEval
All Implemented Interfaces:
Eval, OperationEval

public class AddEval
extends NumericOperationEval

Author:
Amol S. Deshmukh < amolweb at ya hoo dot com > This is a documentation of the observed behaviour of the '+' operator in Excel:
  1. 1+TRUE = 2
  2. 1+FALSE = 1
  3. 1+"true" = #VALUE!
  4. 1+"1" = 2
  5. 1+A1 = #VALUE if A1 contains "1"
  6. 1+A1 = 2 if A1 contains ="1"
  7. 1+A1 = 2 if A1 contains TRUE or =TRUE
  8. 1+A1 = #VALUE! if A1 contains "TRUE" or ="TRUE"

Constructor Summary
AddEval(Ptg ptg)
           
 
Method Summary
 Eval evaluate(Eval[] operands, int srcRow, short srcCol)
           
 int getNumberOfOperands()
           
 int getType()
           
 ValueEvalToNumericXlator getXlator()
           
 
Methods inherited from class org.apache.poi.hssf.record.formula.eval.NumericOperationEval
singleOperandEvaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddEval

public AddEval(Ptg ptg)
Method Detail

getXlator

public ValueEvalToNumericXlator getXlator()
Specified by:
getXlator in class NumericOperationEval

evaluate

public Eval evaluate(Eval[] operands,
                     int srcRow,
                     short srcCol)

getNumberOfOperands

public int getNumberOfOperands()

getType

public int getType()


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.