diff options
author | Amol S. Deshmukh <amol@apache.org> | 2006-11-26 06:15:17 +0000 |
---|---|---|
committer | Amol S. Deshmukh <amol@apache.org> | 2006-11-26 06:15:17 +0000 |
commit | eff173c05d5e14f67c469c3bfa80f923bcd851be (patch) | |
tree | 0a67553ded26660b989a73c86887267d9f434aaa /src/scratchpad | |
parent | 5f9ef7eab070c12cc1aeca0ce75d580afb9dd5aa (diff) | |
download | poi-eff173c05d5e14f67c469c3bfa80f923bcd851be.tar.gz poi-eff173c05d5e14f67c469c3bfa80f923bcd851be.zip |
superclass for logical functions
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@479294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r-- | src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java b/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java new file mode 100644 index 0000000000..57e18888dd --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/LogicalFunction.java @@ -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;
+ }
+}
|