public class MaxVisitor extends Object implements FeatureCalc, FeatureAttributeVisitor
| Modifier and Type | Class and Description |
|---|---|
static class |
MaxVisitor.MaxResult |
| Constructor and Description |
|---|
MaxVisitor(Expression expr) |
MaxVisitor(int attributeTypeIndex,
SimpleFeatureType type) |
MaxVisitor(String attributeTypeName) |
MaxVisitor(String attrName,
SimpleFeatureType type) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
getExpression() |
List<Expression> |
getExpressions()
List of expressions used by visitor.
|
Comparable |
getMax()
Get the max value.
|
int |
getNaNCount() |
int |
getNullCount() |
CalcResult |
getResult()
Returns the result of the calculation as a handy object which can be merged and modified.
|
void |
init(SimpleFeatureCollection collection) |
void |
reset() |
void |
setValue(Object result)
Overwrites the result stored by the visitor.
|
void |
visit(Feature feature)
Visit the provided feature.
|
void |
visit(SimpleFeature feature)
Visitor function, which looks at each feature and finds the maximum.
|
public MaxVisitor(String attributeTypeName)
public MaxVisitor(int attributeTypeIndex,
SimpleFeatureType type)
throws IllegalFilterException
IllegalFilterExceptionpublic MaxVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
IllegalFilterExceptionpublic MaxVisitor(Expression expr) throws IllegalFilterException
IllegalFilterExceptionpublic void init(SimpleFeatureCollection collection)
public List<Expression> getExpressions()
FeatureAttributeVisitorgetExpressions in interface FeatureAttributeVisitorpublic void visit(SimpleFeature feature)
feature - the feature to be visitedpublic void visit(Feature feature)
FeatureVisitorPlease consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.
visit in interface FeatureVisitorpublic Comparable getMax()
IllegalStateException - DOCUMENT ME!public int getNaNCount()
public int getNullCount()
public void reset()
public Expression getExpression()
public CalcResult getResult()
FeatureCalcgetResult in interface FeatureCalcpublic void setValue(Object result)
For 'max', the value stored is of type 'Comparable'.
result - Copyright © 1996–2019 Geotools. All rights reserved.