01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /*
18: * Created on May 9, 2005
19: *
20: *
21: */
22: package org.apache.poi.hssf.record.formula.eval;
23:
24: /**
25: * @author Amol S Deshmukh < amolweb at ya hoo dot com >
26: *
27: * RefEval is the super interface for Ref2D and Ref3DEval. Basically a RefEval
28: * impl should contain reference to the original ReferencePtg or Ref3DPtg as
29: * well as the final "value" resulting from the evaluation of the cell
30: * reference. Thus if the HSSFCell has type CELL_TYPE_NUMERIC, the contained
31: * value object should be of type NumberEval; if cell type is CELL_TYPE_STRING,
32: * contained value object should be of type StringEval
33: */
34: public interface RefEval extends ValueEval {
35:
36: /**
37: * The (possibly evaluated) ValueEval contained
38: * in this RefEval. eg. if cell A1 contains "test"
39: * then in a formula referring to cell A1
40: * the RefEval representing
41: * A1 will return as the getInnerValueEval() the
42: * object of concrete type StringEval
43: */
44: public ValueEval getInnerValueEval();
45:
46: /**
47: * returns the column index.
48: */
49: public short getColumn();
50:
51: /**
52: * returns the row index.
53: */
54: public short getRow();
55:
56: /**
57: * returns true if this RefEval contains an
58: * evaluated value instead of a direct value.
59: * eg. say cell A1 has the value: ="test"
60: * Then the RefEval representing A1 will return
61: * isEvaluated() equal to false. On the other
62: * hand, say cell A1 has the value: =B1 and
63: * B1 has the value "test", then the RefEval
64: * representing A1 will return isEvaluated()
65: * equal to true.
66: */
67: public boolean isEvaluated();
68:
69: }
|