public class MedianVisitor extends Object implements FeatureCalc, FeatureAttributeVisitor
| Modifier and Type | Class and Description |
|---|---|
static class |
MedianVisitor.MedianResult |
| Constructor and Description |
|---|
MedianVisitor(Expression expr) |
MedianVisitor(int attributeTypeIndex,
SimpleFeatureType type) |
MedianVisitor(String attributeTypeName) |
MedianVisitor(String attrName,
SimpleFeatureType type) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
getExpression() |
List<Expression> |
getExpressions()
List of expressions used by visitor.
|
Object |
getMedian()
Return the median of all features in the collection
|
CalcResult |
getResult()
Returns the result of the calculation as a handy object which can be merged and modified.
|
Optional<List<Class>> |
getResultType(List<Class> inputTypes)
Returns the expected output type given the input type.
|
void |
init(SimpleFeatureCollection collection) |
void |
reset()
Reset the stored information about the median.
|
void |
setValue(Comparable median) |
void |
setValue(List<Comparable> list) |
void |
visit(Feature feature)
Visit the provided feature.
|
void |
visit(SimpleFeature feature) |
public MedianVisitor(String attributeTypeName)
public MedianVisitor(int attributeTypeIndex,
SimpleFeatureType type)
throws IllegalFilterException
IllegalFilterExceptionpublic MedianVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
IllegalFilterExceptionpublic MedianVisitor(Expression expr) throws IllegalFilterException
IllegalFilterExceptionpublic void init(SimpleFeatureCollection collection)
public List<Expression> getExpressions()
FeatureAttributeVisitorgetExpressions in interface FeatureAttributeVisitorpublic Optional<List<Class>> getResultType(List<Class> inputTypes)
FeatureAttributeVisitorgetResultType in interface FeatureAttributeVisitorinputTypes - The type of the input expressionspublic void visit(SimpleFeature feature)
public 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 Expression getExpression()
public Object getMedian()
public void reset()
public CalcResult getResult()
FeatureCalcgetResult in interface FeatureCalcpublic void setValue(List<Comparable> list)
public void setValue(Comparable median)
Copyright © 1996–2021 Geotools. All rights reserved.