Class ConstantValue
- java.lang.Object
-
- de.fho.jump.pirol.utilities.FormulaParsing.FormulaValue
-
- de.fho.jump.pirol.utilities.FormulaParsing.Values.ConstantValue
-
public class ConstantValue extends FormulaValue
A simple value class that just stores a constant value.- Version:
- $Rev$
- Author:
- Ole Rahn
FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement
-
-
Field Summary
Fields Modifier and Type Field Description protected doublevalue-
Fields inherited from class de.fho.jump.pirol.utilities.FormulaParsing.FormulaValue
logger
-
-
Constructor Summary
Constructors Constructor Description ConstantValue(double value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetValue(Feature feature)Returns the value (as a double) of this part of the formula.booleanisFeatureDependent()Helps to determine, if the value depends on a feature's attribute value.StringtoString()
-
-
-
Method Detail
-
getValue
public double getValue(Feature feature)
Description copied from class:FormulaValueReturns the value (as a double) of this part of the formula. It may be the result of a sub-formula, a feature-specific attribute value or just a constant value... Since the value may depend on a feature, we give the feature to the method to get a unified interface...- Specified by:
getValuein classFormulaValue- Parameters:
feature- in this case we don't need the feature...- Returns:
- the constant value
-
isFeatureDependent
public boolean isFeatureDependent()
Description copied from class:FormulaValueHelps to determine, if the value depends on a feature's attribute value.- Specified by:
isFeatureDependentin classFormulaValue- Returns:
- true, if the value depends on a feature
-
toString
public String toString()
- Overrides:
toStringin classFormulaValue
-
-