|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAverageVisitor
public class AverageVisitor
Calculates the Average
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()
|
List<Expression> |
getExpressions()
List of expressions used by visitor. |
CalcResult |
getResult()
Returns a CalcResult object (containing the Average) |
void |
init(SimpleFeatureCollection collection)
|
void |
reset()
Resets the "Average" strategy pattern |
void |
setValue(int newCount,
Object newSum)
|
void |
setValue(Object newAverage)
|
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 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(SimpleFeatureCollection collection)
public List<Expression> getExpressions()
FeatureAttributeVisitor
getExpressions
in interface FeatureAttributeVisitor
public void visit(SimpleFeature feature)
public void visit(Feature feature)
FeatureVisitor
Please consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.
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 |