Package org.geotools.feature.visitor
Class UniqueCountVisitor
- Object
-
- UniqueVisitor
-
- UniqueCountVisitor
-
- All Implemented Interfaces:
FeatureVisitor
,FeatureAttributeVisitor
,FeatureCalc
,LimitingVisitor
public class UniqueCountVisitor extends UniqueVisitor
Determines the number of unique features in the collection on the basis of the specified feature attribute.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class UniqueVisitor
UniqueVisitor.UniqueResult
-
-
Constructor Summary
Constructors Constructor Description UniqueCountVisitor(int attributeTypeIndex, SimpleFeatureType type)
UniqueCountVisitor(String attributeTypeName)
UniqueCountVisitor(String attrName, SimpleFeatureType type)
UniqueCountVisitor(Expression expr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CalcResult
getResult()
Returns the result of the calculation as a handy object which can be merged and modified.void
setValue(Integer count)
-
Methods inherited from class UniqueVisitor
getAttrNames, getExpression, getExpressions, getMaxFeatures, getResultType, getStartIndex, getUnique, hasLimits, init, isPreserveOrder, reset, setMaxFeatures, setPreserveOrder, setStartIndex, setValue, visit, visit
-
-
-
-
Constructor Detail
-
UniqueCountVisitor
public UniqueCountVisitor(String attributeTypeName)
-
UniqueCountVisitor
public UniqueCountVisitor(int attributeTypeIndex, SimpleFeatureType type) throws IllegalFilterException
- Throws:
IllegalFilterException
-
UniqueCountVisitor
public UniqueCountVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
- Throws:
IllegalFilterException
-
UniqueCountVisitor
public UniqueCountVisitor(Expression expr)
-
-
Method Detail
-
setValue
public void setValue(Integer count)
-
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
- Overrides:
getResult
in classUniqueVisitor
- Returns:
- the results of the calculation
-
-