poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r479294 - /jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
Date Sun, 26 Nov 2006 06:15:17 GMT
Author: amol
Date: Sat Nov 25 22:15:17 2006
New Revision: 479294

URL: http://svn.apache.org/viewvc?view=rev&rev=479294
Log:
superclass for logical functions

Added:
    jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java

Added: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java?view=auto&rev=479294
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
(added)
+++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java
Sat Nov 25 22:15:17 2006
@@ -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;
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message