org.geotools.feature.visitor
Class CountVisitor

Object
  extended by CountVisitor
All Implemented Interfaces:
FeatureCalc, FeatureVisitor

public class CountVisitor
extends Object
implements FeatureCalc

Determines the number of features in the collection

Since:
2.2.M2
Author:
Cory Horner, Refractions
Module:

Nested Class Summary
static class CountVisitor.CountResult
           
 
Constructor Summary
CountVisitor()
           
 
Method Summary
 int getCount()
           
 CalcResult getResult()
          Returns the result of the calculation as a handy object which can be merged and modified.
 void init(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
           
 void reset()
           
 void setValue(int count)
           
 void visit(Feature feature)
           
 void visit(SimpleFeature feature)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountVisitor

public CountVisitor()
Method Detail

init

public void init(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)

visit

public void visit(SimpleFeature feature)

visit

public void visit(Feature feature)
Specified by:
visit in interface FeatureVisitor

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 interface FeatureCalc
Returns:
the results of the calculation


Copyright © 1996-2009 Geotools. All Rights Reserved.