Class ComposedEvaluator<S>

    • Field Detail

    • Constructor Detail

      • ComposedEvaluator

        public ComposedEvaluator()
        Creates the combiner.
    • Method Detail

      • addEvaluator

        public void addEvaluator​(IServiceEvaluator evaluator)
        Adds a new evaluator with a weight of 1.0.
        Parameters:
        evaluator - The new evaluator.
      • addEvaluator

        public 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.
      • removeEvaluator

        public void removeEvaluator​(IServiceEvaluator evaluator)
        Removes an evaluator.
        Parameters:
        evaluator - The evaluator.
      • evaluate

        public 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:
        evaluate in interface IServiceEvaluator
        Parameters:
        service - The service being evaluated.
        Returns:
        An evaluation of the service in a range between 0 and 1 (inclusive).
      • rank

        public IFuture<java.util.List<S>> rank​(java.util.List<S> unrankedservices)
        Ranks services according to non-functional criteria.
        Specified by:
        rank in interface IServiceRanker<S>
        Parameters:
        unrankedservices - Unranked list of services.
        Returns:
        Ranked list of services.
      • rankWithScores

        public IFuture<java.util.List<Tuple2<S,​java.lang.Double>>> rankWithScores​(java.util.List<S> unrankedservices)
        Ranks services according to non-functional criteria.
        Specified by:
        rankWithScores in interface IServiceRanker<S>
        Parameters:
        unrankedservices - Unranked list of services.
        Returns:
        Ranked list of services and scores.