Package org.geotools.feature.visitor
Class CountVisitor
- Object
-
- CountVisitor
-
- All Implemented Interfaces:
FeatureVisitor
,FeatureCalc
public class CountVisitor extends Object implements FeatureCalc
Determines the number of features in the collection- Since:
- 2.2.M2
- Author:
- Cory Horner, Refractions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CountVisitor.CountResult
-
Constructor Summary
Constructors Constructor Description CountVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCount()
CalcResult
getResult()
Returns the result of the calculation as a handy object which can be merged and modified.void
init(SimpleFeatureCollection collection)
void
reset()
void
setValue(int count)
void
visit(Feature feature)
Visit the provided feature.void
visit(SimpleFeature feature)
-
-
-
Method Detail
-
init
public void init(SimpleFeatureCollection collection)
-
visit
public void visit(SimpleFeature feature)
-
visit
public void visit(Feature feature)
Description copied from interface:FeatureVisitor
Visit the provided feature.Please consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.
- Specified by:
visit
in interfaceFeatureVisitor
-
getCount
public int getCount()
-
setValue
public void setValue(int count)
-
reset
public void reset()
-
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 interfaceFeatureCalc
- Returns:
- the results of the calculation
-
-