Class BasicEvaluator<T>
- java.lang.Object
-
- jadex.bridge.nonfunctional.search.BasicEvaluator<T>
-
- All Implemented Interfaces:
IServiceEvaluator
- Direct Known Subclasses:
ExecutionTimeEvaluator,WaitqueueEvaluator
public abstract class BasicEvaluator<T> extends java.lang.Object implements IServiceEvaluator
Basic evaluator implementation for service and methods.
-
-
Field Summary
Fields Modifier and Type Field Description protected IExternalAccesscomponentThe component.protected MethodInfomethodinfoThe method info.protected java.lang.StringpropertynameThe property name.protected booleanrequiredThe required flag.protected java.lang.ObjectunitThe unit.
-
Constructor Summary
Constructors Constructor Description BasicEvaluator(IExternalAccess component, java.lang.String propertyname)Create a new evaluator.BasicEvaluator(IExternalAccess component, java.lang.String propertyname, MethodInfo mi)Create a new evaluator.BasicEvaluator(IExternalAccess component, java.lang.String propertyname, MethodInfo methodinfo, java.lang.Object unit, boolean required)Create a new evaluator.BasicEvaluator(IExternalAccess component, java.lang.String propertyname, java.lang.Object unit)Create a new evaluator.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doublecalculateEvaluation(T propertyvalue)IFuture<java.lang.Double>evaluate(IService service)Evaluate the service of method.protected IFuture<T>getPropertyValue(IServiceIdentifier sid)Get the property value based on the provider.
-
-
-
Field Detail
-
component
protected IExternalAccess component
The component.
-
propertyname
protected java.lang.String propertyname
The property name.
-
methodinfo
protected MethodInfo methodinfo
The method info.
-
unit
protected java.lang.Object unit
The unit.
-
required
protected boolean required
The required flag.
-
-
Constructor Detail
-
BasicEvaluator
public BasicEvaluator(IExternalAccess component, java.lang.String propertyname)
Create a new evaluator.- Parameters:
propertyname- The property name.
-
BasicEvaluator
public BasicEvaluator(IExternalAccess component, java.lang.String propertyname, java.lang.Object unit)
Create a new evaluator.- Parameters:
propertyname- The property name.
-
BasicEvaluator
public BasicEvaluator(IExternalAccess component, java.lang.String propertyname, MethodInfo mi)
Create a new evaluator.- Parameters:
propertyname- The property name.
-
BasicEvaluator
public BasicEvaluator(IExternalAccess component, java.lang.String propertyname, MethodInfo methodinfo, java.lang.Object unit, boolean required)
Create a new evaluator.- Parameters:
propertyname- The property name.methodinfo- The method.unit- The unit.
-
-
Method Detail
-
calculateEvaluation
public abstract double calculateEvaluation(T propertyvalue)
- Parameters:
propertyvalue-- Returns:
-
evaluate
public IFuture<java.lang.Double> evaluate(IService service)
Evaluate the service of method.- Specified by:
evaluatein interfaceIServiceEvaluator- Parameters:
service- The service being evaluated.- Returns:
- An evaluation of the service in a range between 0 and 1 (inclusive).
-
getPropertyValue
protected IFuture<T> getPropertyValue(IServiceIdentifier sid)
Get the property value based on the provider.
-
-