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
        inputTypes - The type of the input expressions
      • visit

        public void visit​(SimpleFeature feature)
        Visitor function, which looks at each feature and finds the maximum.
        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.
        Max value
      • getNaNCount

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

        public int getNullCount()
        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
        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'.