superclass for logical functions
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@479294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae6f6b3d1a
commit
b6d7c5ec34
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Created on Nov 25, 2006
|
||||
*
|
||||
*/
|
||||
package org.apache.poi.hssf.record.formula.functions;
|
||||
|
||||
import org.apache.poi.hssf.record.formula.eval.RefEval;
|
||||
import org.apache.poi.hssf.record.formula.eval.ValueEval;
|
||||
|
||||
/**
|
||||
* @author Amol S. Deshmukh < amolweb at ya hoo dot com >
|
||||
*
|
||||
*/
|
||||
public abstract class LogicalFunction implements Function {
|
||||
|
||||
/**
|
||||
* recursively evaluate any RefEvals
|
||||
* @param reval
|
||||
* @return
|
||||
*/
|
||||
protected ValueEval xlateRefEval(RefEval reval) {
|
||||
ValueEval retval = (ValueEval) reval.getInnerValueEval();
|
||||
|
||||
if (retval instanceof RefEval) {
|
||||
RefEval re = (RefEval) retval;
|
||||
retval = xlateRefEval(re);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user