Class AverageVisitor

    • Method Detail

      • getResultType

        public Optional<List<Class>> getResultType​(List<Class> inputTypes)
        Description copied from interface: FeatureAttributeVisitor
        Returns the expected output type given the input type.
        Specified by:
        getResultType in interface FeatureAttributeVisitor
        Parameters:
        inputTypes - The type of the input expressions
      • visit

        public void visit​(Feature feature)
        Description copied from interface: FeatureVisitor
        Visit the provided feature.

        Please consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.

        Specified by:
        visit in interface FeatureVisitor
      • getExpression

        public Expression getExpression()
      • getAverage

        public Object getAverage()
        Returns the average from the visitor's current
        Returns:
        the average
      • reset

        public void reset()
        Resets the "Average" strategy pattern
      • getResult

        public CalcResult getResult()
        Returns a CalcResult object (containing the Average)
        Specified by:
        getResult in interface FeatureCalc
        Returns:
        the results of the calculation
      • setValue

        public void setValue​(Object newAverage)
      • setValue

        public void setValue​(int newCount,
                             Object newSum)