|
||||||||||
| 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()
|
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 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()
FeatureCalc
getResult in interface FeatureCalcpublic 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 | |||||||||