01: /*
02: * Created on 23.06.2005 for PIROL
03: *
04: * SVN header information:
05: * $Author: javamap $
06: * $Rev: 856 $
07: * $Date: 2007-06-18 21:15:27 -0700 (Mon, 18 Jun 2007) $
08: * $Id: ConstantValue.java 856 2007-06-19 04:15:27Z javamap $
09: */
10: package de.fho.jump.pirol.utilities.FormulaParsing.Values;
11:
12: import com.vividsolutions.jump.feature.Feature;
13:
14: import de.fho.jump.pirol.utilities.FormulaParsing.FormulaValue;
15:
16: /**
17: * A simple value class that just stores a constant value.
18: *
19: * @author Ole Rahn
20: * <br>
21: * <br>FH Osnabrück - University of Applied Sciences Osnabrück,
22: * <br>Project: PIROL (2005),
23: * <br>Subproject: Daten- und Wissensmanagement
24: *
25: * @version $Rev: 856 $
26: *
27: */
28: public class ConstantValue extends FormulaValue {
29:
30: protected double value;
31:
32: public ConstantValue(double value) {
33: super ();
34: this .value = value;
35: }
36:
37: /**
38: *@param feature in this case we don't need the feature...
39: *@return the constant value
40: */
41: public double getValue(Feature feature) {
42: return this .value;
43: }
44:
45: /**
46: * @inheritDoc
47: */
48: public boolean isFeatureDependent() {
49: return false;
50: }
51:
52: /**
53: * @inheritDoc
54: */
55: public String toString() {
56: return "" + this.value;
57: }
58:
59: }
|