org.geotools.filter
Class LengthFunction

java.lang.Object
  extended byorg.geotools.filter.DefaultExpression
      extended byorg.geotools.filter.FunctionExpressionImpl
          extended byorg.geotools.filter.LengthFunction
All Implemented Interfaces:
Expression, ExpressionType, Factory, FunctionExpression

public class LengthFunction
extends FunctionExpressionImpl

Takes an AttributeExpression, and computes the length of the data for the attribute.

Author:
dzwiers

Field Summary
 
Fields inherited from class org.geotools.filter.DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface org.geotools.filter.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Constructor Summary
LengthFunction()
           
 
Method Summary
 int getArgCount()
          Gets the number of arguments that are set.
 Expression[] getArgs()
          Gets the arguments to be evaluated by this function.
 java.lang.String getName()
          Gets the name of this function.
 java.lang.Object getValue(Feature feature)
          Returns a value for this expression.
 void setArgs(Expression[] args)
          Sets the arguments to be evaluated by this function.
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.filter.FunctionExpressionImpl
accept, getImplementationHints, getType
 
Methods inherited from class org.geotools.filter.DefaultExpression
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LengthFunction

public LengthFunction()
Method Detail

getName

public java.lang.String getName()
Description copied from class: FunctionExpressionImpl
Gets the name of this function.

Specified by:
getName in interface FunctionExpression
Specified by:
getName in class FunctionExpressionImpl
Returns:
the name of the function.

setArgs

public void setArgs(Expression[] args)
Description copied from class: FunctionExpressionImpl
Sets the arguments to be evaluated by this function.

Specified by:
setArgs in interface FunctionExpression
Specified by:
setArgs in class FunctionExpressionImpl
Parameters:
args - an array of expressions to be evaluated.

getArgCount

public int getArgCount()
Description copied from class: FunctionExpressionImpl
Gets the number of arguments that are set.

Specified by:
getArgCount in interface FunctionExpression
Specified by:
getArgCount in class FunctionExpressionImpl
Returns:
the number of args.

getArgs

public Expression[] getArgs()
Description copied from interface: FunctionExpression
Gets the arguments to be evaluated by this function.

Returns:
an array of the args to be evaluated.

getValue

public java.lang.Object getValue(Feature feature)
Description copied from interface: Expression
Returns a value for this expression. The feature argument is used if a feature is needed to evaluate the expression, as in the case of an AttributeExpression.

Specified by:
getValue in interface Expression
Overrides:
getValue in class DefaultExpression
Parameters:
feature - Specified feature to use when returning value.
Returns:
The value of this expression based on the feature.

toString

public java.lang.String toString()


Copyright © GeoTools. All Rights Reserved.