org.apache.poi.hssf.record.formula.functions
Class BooleanFunction

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.functions.BooleanFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
And, Or

public abstract class BooleanFunction
extends java.lang.Object
implements Function

Here are the general rules concerning Boolean functions:

  1. Blanks are ignored (not either true or false)
  2. Strings are ignored if part of an area ref or cell ref, otherwise they must be 'true' or 'false'
  3. Numbers: 0 is false. Any other number is TRUE
  4. Areas: *all* cells in area are evaluated according to the above rules

Author:
Amol S. Deshmukh < amolweb at ya hoo dot com >

Constructor Summary
BooleanFunction()
           
 
Method Summary
 Eval evaluate(Eval[] args, int srcRow, short srcCol)
           
protected abstract  boolean getInitialResultValue()
           
protected abstract  boolean partialEvaluate(boolean cumulativeResult, boolean currentValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanFunction

public BooleanFunction()
Method Detail

evaluate

public final Eval evaluate(Eval[] args,
                           int srcRow,
                           short srcCol)
Specified by:
evaluate in interface Function

getInitialResultValue

protected abstract boolean getInitialResultValue()

partialEvaluate

protected abstract boolean partialEvaluate(boolean cumulativeResult,
                                           boolean currentValue)


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