de.fho.jump.pirol.utilities.FormulaParsing
Class FormulaValue

java.lang.Object
  extended by de.fho.jump.pirol.utilities.FormulaParsing.FormulaValue
Direct Known Subclasses:
AttributeValue, ConstantValue, GenericOperation, SquareRootOperation

public abstract class FormulaValue
extends java.lang.Object

Base class for each sub-formula or value of a formula, since we don't want to parse the formula again and again for each value...

Version:
$Rev: 856 $
Author:
Ole Rahn

FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement

Field Summary
protected  PersonalLogger logger
           
 
Constructor Summary
FormulaValue()
           
 
Method Summary
abstract  double getValue(Feature feature)
          Returns the value (as a double) of this part of the formula.
abstract  boolean isFeatureDependent()
          Helps to determine, if the value depends on a feature's attribute value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected PersonalLogger logger
Constructor Detail

FormulaValue

public FormulaValue()
Method Detail

getValue

public abstract double getValue(Feature feature)
Returns the value (as a double) of this part of the formula. It may be the rsult 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...

Returns:
value of this part of the formula

isFeatureDependent

public abstract boolean isFeatureDependent()
Helps to determine, if the value depends on a feature's attribute value.

Returns:
true, if the value depends on a feature

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object