|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.visitor.IsStaticExpressionVisitor
public class IsStaticExpressionVisitor
Check if an expression is static (ie does not contain a PropertyName expression).
This visitor will "short-circuit" the moment it finds a PropertyName expression and will not need to visit the entire data structure.
Example:
if( filter.accepts( IsStaticExpressionVisitor.VISITOR, null ) ){
Color color = expression.evaulate( null, Color.class );
...
}
Field Summary | |
---|---|
static IsStaticExpressionVisitor |
VISITOR
|
Constructor Summary | |
---|---|
protected |
IsStaticExpressionVisitor()
visit each expression and check that they are static |
Method Summary | |
---|---|
java.lang.Boolean |
visit(org.opengis.filter.expression.Add expression,
java.lang.Object data)
visit each expression and check that they are static |
java.lang.Boolean |
visit(org.opengis.filter.expression.Divide expression,
java.lang.Object data)
visit each expression and check that they are static |
java.lang.Boolean |
visit(org.opengis.filter.expression.Function expression,
java.lang.Object data)
Visit each parameter and check if they are static |
java.lang.Boolean |
visit(org.opengis.filter.expression.Literal expression,
java.lang.Object data)
Literal expressions are always static. |
java.lang.Boolean |
visit(org.opengis.filter.expression.Multiply expression,
java.lang.Object data)
visit each expression and check that they are static. |
java.lang.Boolean |
visit(org.opengis.filter.expression.NilExpression expression,
java.lang.Object data)
visit each expression and check that they are static |
java.lang.Boolean |
visit(org.opengis.filter.expression.PropertyName expression,
java.lang.Object data)
If even a single PropertyName is found in the expression the expression is not static. |
java.lang.Boolean |
visit(org.opengis.filter.expression.Subtract expression,
java.lang.Object data)
visit each expression and check that they are static. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IsStaticExpressionVisitor VISITOR
Constructor Detail |
---|
protected IsStaticExpressionVisitor()
Method Detail |
---|
public java.lang.Boolean visit(org.opengis.filter.expression.NilExpression expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Add expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Divide expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Function expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Literal expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Multiply expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.PropertyName expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
public java.lang.Boolean visit(org.opengis.filter.expression.Subtract expression, java.lang.Object data)
visit
in interface org.opengis.filter.expression.ExpressionVisitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |