Package org.geotools.filter.function
Class InFunction
-
- All Implemented Interfaces:
Expression,Function,FunctionExpression,Factory
public class InFunction extends FunctionExpressionImpl
The function checks whether a candidate value is contained in an arbitrary long list of user provided values.If the candidate value is found, the function returns
true; otherwise, it returnsfalse.- Author:
- Stefano Costa, GeoSolutions
-
-
Field Summary
Fields Modifier and Type Field Description static FunctionNameNAME-
Fields inherited from class FunctionExpressionImpl
fallback, functionName, name, params
-
Fields inherited from interface Expression
NIL
-
-
Constructor Summary
Constructors Constructor Description InFunction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectevaluate(Object feature)Subclass should override, default implementation returns null.intgetArgCount()static FilterCapabilitiesgetInCapabilities()Returns filter capabilities for all the "in" functionsStringgetName()Gets the name of this function.static booleanisInFunction(Expression expression)Returns true if the expression is a function in the "in" family, that is, "in", "in2", "in3", ...voidsetParameters(List<Expression> parameters)Sets the function parameters.-
Methods inherited from class FunctionExpressionImpl
accept, equals, functionName, getExpression, getFallbackValue, getFunctionName, getImplementationHints, getParameters, hashCode, setFallbackValue, toString
-
Methods inherited from class DefaultExpression
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
-
Methods inherited from class ExpressionAbstract
evaluate
-
Methods inherited from interface Expression
evaluate
-
-
-
-
Field Detail
-
NAME
public static FunctionName NAME
-
-
Method Detail
-
isInFunction
public static boolean isInFunction(Expression expression)
Returns true if the expression is a function in the "in" family, that is, "in", "in2", "in3", ...- Parameters:
expression- The expression to be tested
-
getInCapabilities
public static FilterCapabilities getInCapabilities()
Returns filter capabilities for all the "in" functions- Returns:
- a
FilterCapabilitieswith all the functions in the "in" family
-
getName
public String getName()
Description copied from class:FunctionExpressionImplGets the name of this function.- Specified by:
getNamein interfaceFunction- Overrides:
getNamein classFunctionExpressionImpl- Returns:
- the name of the function.
-
getArgCount
public int getArgCount()
-
setParameters
public void setParameters(List<Expression> parameters)
Description copied from class:FunctionExpressionImplSets the function parameters.- Specified by:
setParametersin interfaceFunctionExpression- Overrides:
setParametersin classFunctionExpressionImpl
-
evaluate
public Object evaluate(Object feature)
Description copied from class:ExpressionAbstractSubclass should override, default implementation returns null.- Specified by:
evaluatein interfaceExpression- Overrides:
evaluatein classFunctionExpressionImpl- Returns:
- default implementation returns null
-
-