|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAverageVisitor
public class AverageVisitor
Calculates the Average
modules/library/main (gt-main.jar)
Nested Class Summary | |
---|---|
static class |
AverageVisitor.AverageResult
|
Constructor Summary | |
---|---|
AverageVisitor(Expression expr)
Constructor class for the AverageVisitor using an expression |
|
AverageVisitor(int attributeTypeIndex,
SimpleFeatureType type)
Constructor class for the AverageVisitor using AttributeDescriptor ID |
|
AverageVisitor(String attrName,
SimpleFeatureType type)
Constructor class for the AverageVisitor using AttributeDescriptor Name |
Method Summary | |
---|---|
Object |
getAverage()
Returns the average from the visitor's current |
Expression |
getExpression()
|
CalcResult |
getResult()
Returns a CalcResult object (containing the Average) |
void |
init(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
|
void |
reset()
Resets the "Average" strategy pattern |
void |
setValue(int newCount,
Object newSum)
|
void |
setValue(Object newAverage)
|
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 |
---|
public AverageVisitor(int attributeTypeIndex, SimpleFeatureType type) throws IllegalFilterException
attributeTypeIndex
- integer representing the AttributeDescriptortype
- FeatureType
IllegalFilterException
public AverageVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
attrName
- string respresenting the AttributeDescriptortype
- FeatureType
IllegalFilterException
public AverageVisitor(Expression expr) throws IllegalFilterException
expr
-
IllegalFilterException
Method Detail |
---|
public void init(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
public void visit(SimpleFeature feature)
public void visit(Feature feature)
visit
in interface FeatureVisitor
public Expression getExpression()
public Object getAverage()
public void reset()
public CalcResult getResult()
getResult
in interface FeatureCalc
public void setValue(Object newAverage)
public void setValue(int newCount, Object newSum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |