org.geotools.feature.visitor
Class MedianVisitor
java.lang.Object
org.geotools.feature.visitor.MedianVisitor
- All Implemented Interfaces:
- FeatureCalc, FeatureVisitor
- public class MedianVisitor
- extends java.lang.Object
- implements FeatureCalc
Calculates the median of an attribute in all features of a collection
- Since:
- 2.2.M2
- Author:
- Cory Horner, Refractions
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MedianVisitor
public MedianVisitor(int attributeTypeIndex,
FeatureType type)
throws IllegalFilterException
MedianVisitor
public MedianVisitor(java.lang.String attrName,
FeatureType type)
throws IllegalFilterException
MedianVisitor
public MedianVisitor(Expression expr)
throws IllegalFilterException
visit
public void visit(Feature feature)
- Specified by:
visit
in interface FeatureVisitor
getExpression
public Expression getExpression()
getMedian
public java.lang.Object getMedian()
- Return the median of all features in the collection
reset
public void reset()
- Reset the stored information about the median.
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(java.util.List list)
setValue
public void setValue(java.lang.Comparable median)
Copyright © GeoTools. All Rights Reserved.