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
IllegalFilterException
public MedianVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
IllegalFilterException
public MedianVisitor(Expression expr) throws IllegalFilterException
IllegalFilterException
public void init(SimpleFeatureCollection collection)
public List<Expression> getExpressions()
FeatureAttributeVisitor
getExpressions
in interface FeatureAttributeVisitor
public Optional<List<Class>> getResultType(List<Class> inputTypes)
FeatureAttributeVisitor
getResultType
in interface FeatureAttributeVisitor
inputTypes
- The type of the input expressionspublic void visit(SimpleFeature feature)
public void visit(Feature feature)
FeatureVisitor
Please consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.
visit
in interface FeatureVisitor
public Expression getExpression()
public Object getMedian()
public void reset()
public CalcResult getResult()
FeatureCalc
getResult
in interface FeatureCalc
public void setValue(List<Comparable> list)
public void setValue(Comparable median)
Copyright © 1996–2022 Geotools. All rights reserved.