Class MaxVisitor

    • 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​(SimpleFeature feature)
        Visitor function, which looks at each feature and finds the maximum.
        Parameters:
        feature - the feature to be visited
      • 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
      • getMax

        public Comparable getMax()
        Get the max value.
        Returns:
        Max value
      • getNaNCount

        public int getNaNCount()
        Returns:
        the number of features which returned a NaN
      • getNullCount

        public int getNullCount()
        Returns:
        the number of features which returned a null
      • reset

        public void reset()
      • getExpression

        public Expression getExpression()
      • getResult

        public CalcResult getResult()
        Description copied from interface: FeatureCalc
        Returns the result of the calculation as a handy object which can be merged and modified.
        Specified by:
        getResult in interface FeatureCalc
        Returns:
        the results of the calculation
      • setValue

        public void setValue​(Object result)
        Overwrites the result stored by the visitor. This should only be used by optimizations which will tell the visitor the answer rather than visiting all features.

        For 'max', the value stored is of type 'Comparable'.