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: SubtractionOperation.java 856 2007-06-19 04:15:27Z javamap $
09: */
10: package de.fho.jump.pirol.utilities.FormulaParsing.Operations;
11:
12: import com.vividsolutions.jump.feature.Feature;
13:
14: import de.fho.jump.pirol.utilities.FormulaParsing.FormulaValue;
15:
16: /**
17: * Class to handle subtractions within a formula.
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 SubtractionOperation extends GenericOperation {
29:
30: /**
31: *@inheritDoc
32: */
33: public SubtractionOperation(FormulaValue value1, FormulaValue value2) {
34: super (value1, value2);
35: this .opString = "-";
36: }
37:
38: /**
39: * Returns the subtracted values of the sub-values or sub-operations of this operation
40: *@param feature
41: *@return subtracted values of the sub-values or sub-operations
42: */
43: public double getValue(Feature feature) {
44: return this.value1.getValue(feature)
45: - this.value2.getValue(feature);
46: }
47:
48: }
|