Class ComposedEvaluator<S>
- java.lang.Object
- 
- jadex.bridge.nonfunctional.search.ComposedEvaluator<S>
 
- 
- All Implemented Interfaces:
- IServiceEvaluator,- IServiceRanker<S>
 
 public class ComposedEvaluator<S> extends java.lang.Object implements IServiceEvaluator, IServiceRanker<S> Evaluator composed of multiple weighted evaluators.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.List<Tuple2<IServiceEvaluator,java.lang.Double>>evaluatorsThe evaluators.
 - 
Constructor SummaryConstructors Constructor Description ComposedEvaluator()Creates the combiner.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvaluator(IServiceEvaluator evaluator)Adds a new evaluator with a weight of 1.0.voidaddEvaluator(IServiceEvaluator evaluator, double weight)Adds a new evaluator.IFuture<java.lang.Double>evaluate(IService service)Evaluates the service in detail.IFuture<java.util.List<S>>rank(java.util.List<S> unrankedservices)Ranks services according to non-functional criteria.IFuture<java.util.List<Tuple2<S,java.lang.Double>>>rankWithScores(java.util.List<S> unrankedservices)Ranks services according to non-functional criteria.voidremoveEvaluator(IServiceEvaluator evaluator)Removes an evaluator.
 
- 
- 
- 
Field Detail- 
evaluatorsprotected java.util.List<Tuple2<IServiceEvaluator,java.lang.Double>> evaluators The evaluators.
 
- 
 - 
Method Detail- 
addEvaluatorpublic void addEvaluator(IServiceEvaluator evaluator) Adds a new evaluator with a weight of 1.0.- Parameters:
- evaluator- The new evaluator.
 
 - 
addEvaluatorpublic void addEvaluator(IServiceEvaluator evaluator, double weight) Adds a new evaluator.- Parameters:
- evaluator- The new evaluator.
- weight- The weight of the evaluator relative to other evaluators.
 
 - 
removeEvaluatorpublic void removeEvaluator(IServiceEvaluator evaluator) Removes an evaluator.- Parameters:
- evaluator- The evaluator.
 
 - 
evaluatepublic IFuture<java.lang.Double> evaluate(IService service) Evaluates the service in detail. This method must return an evaluation of the service in the range between 0 (worst/unacceptable) to 1 (best/preferred).- Specified by:
- evaluatein interface- IServiceEvaluator
- Parameters:
- service- The service being evaluated.
- Returns:
- An evaluation of the service in a range between 0 and 1 (inclusive).
 
 - 
rankpublic IFuture<java.util.List<S>> rank(java.util.List<S> unrankedservices) Ranks services according to non-functional criteria.- Specified by:
- rankin interface- IServiceRanker<S>
- Parameters:
- unrankedservices- Unranked list of services.
- Returns:
- Ranked list of services.
 
 - 
rankWithScorespublic IFuture<java.util.List<Tuple2<S,java.lang.Double>>> rankWithScores(java.util.List<S> unrankedservices) Ranks services according to non-functional criteria.- Specified by:
- rankWithScoresin interface- IServiceRanker<S>
- Parameters:
- unrankedservices- Unranked list of services.
- Returns:
- Ranked list of services and scores.
 
 
- 
 
-