Class AverageEvaluator

    • Field Detail

      • value

        protected java.lang.Double value
        The last average value.
      • period

        protected int period
        The avg period.
    • Constructor Detail

      • AverageEvaluator

        public AverageEvaluator​(IServiceEvaluator evaluator)
        Create a new AverageEvaluator.
      • AverageEvaluator

        public AverageEvaluator​(IServiceEvaluator evaluator,
                                int period)
        Create a new AverageEvaluator.
    • Method Detail

      • 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).