|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMedianVisitor
public class MedianVisitor
Calculates the median of an attribute in all features of a collection
Nested Class Summary | |
---|---|
static class |
MedianVisitor.MedianResult
|
Constructor Summary | |
---|---|
MedianVisitor(Expression expr)
|
|
MedianVisitor(int attributeTypeIndex,
SimpleFeatureType type)
|
|
MedianVisitor(String attributeTypeName)
|
|
MedianVisitor(String attrName,
SimpleFeatureType type)
|
Method Summary | |
---|---|
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. |
void |
init(SimpleFeatureCollection collection)
|
void |
reset()
Reset the stored information about the median. |
void |
setValue(Comparable median)
|
void |
setValue(List list)
|
void |
visit(Feature feature)
Visit the provided feature. |
void |
visit(SimpleFeature feature)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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
Method Detail |
---|
public void init(SimpleFeatureCollection collection)
public List<Expression> getExpressions()
FeatureAttributeVisitor
getExpressions
in interface FeatureAttributeVisitor
public 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 list)
public void setValue(Comparable median)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |