Class BasicEvaluator<T>

    • Field Detail

      • 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:
        evaluate in interface IServiceEvaluator
        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.