eu.xtreemos.xosd.resmng.data
Class NodeEvaluationConstant

java.lang.Object
  extended by eu.xtreemos.xosd.resmng.data.NodeEvaluationConstant
All Implemented Interfaces:
INodeEvaluation

public class NodeEvaluationConstant
extends java.lang.Object
implements INodeEvaluation

The evaluation function which returns a constant.

Author:
matej.artac@xlab.si

Field Summary
protected  double constantValue
          The value used as the constant when evaluating the function.
(package private) static org.apache.log4j.Logger logger
           
 
Constructor Summary
NodeEvaluationConstant(double constantValue)
          Initialise the evaluation function to be a constant.
 
Method Summary
 double getScore(java.lang.Object attributeValue)
          The return value of the function is always the value set at initialisation as the constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger

constantValue

protected double constantValue
The value used as the constant when evaluating the function.

Constructor Detail

NodeEvaluationConstant

public NodeEvaluationConstant(double constantValue)
Initialise the evaluation function to be a constant.

Parameters:
constantValue - The value the function will return regardless of the parameter value.
Method Detail

getScore

public double getScore(java.lang.Object attributeValue)
The return value of the function is always the value set at initialisation as the constant.

Specified by:
getScore in interface INodeEvaluation
Parameters:
attributeValue - The value of the attribute to be evaluated, or null if
Returns:
The score evaluated as the value of the function at the point of the attributeValue parameter.