T
- public class NearestVisitor extends Object implements FeatureCalc, FeatureAttributeVisitor
Constructor and Description |
---|
NearestVisitor(Expression expression,
Object valueToMatch)
Creates a NearestVisitor instance for the given attribute and a value to match.
|
Modifier and Type | Method and Description |
---|---|
Expression |
getExpression()
Expression used to access collection content.
|
List<Expression> |
getExpressions()
List of expressions used by visitor.
|
Object |
getNearestMatch()
Returns the match after
visit(org.opengis.feature.Feature) . |
CalcResult |
getResult()
Returns the result of the calculation as a handy object which can be merged and modified.
|
Object |
getValueToMatch()
Provided value to match against.
|
void |
reset() |
void |
setValue(Object nearest) |
void |
setValue(Object maxBelow,
Object minAbove) |
void |
visit(Feature feature)
Visitor function, which looks at each feature and finds the value of the attribute given
attribute nearest to the given comparison value.
|
public NearestVisitor(Expression expression, Object valueToMatch)
expression
- valueToMatch
- The target value to matchpublic void visit(Feature feature)
visit
in interface FeatureVisitor
feature
- the feature to be visitedpublic void reset()
public void setValue(Object nearest)
public Object getNearestMatch() throws IllegalStateException
visit(org.opengis.feature.Feature)
.IllegalStateException
public CalcResult getResult()
FeatureCalc
getResult
in interface FeatureCalc
public Expression getExpression()
public Object getValueToMatch()
public List<Expression> getExpressions()
FeatureAttributeVisitor
getExpressions
in interface FeatureAttributeVisitor
Copyright © 1996–2019 Geotools. All rights reserved.