org.geotools.filter.function
Class QuantileFunction

Object
  extended by ExpressionAbstract
      extended by DefaultExpression
          extended by ClassificationFunction
              extended by QuantileFunction
All Implemented Interfaces:
Factory, ExpressionType, FunctionExpression, Expression, Function

public class QuantileFunction
extends ClassificationFunction

Breaks a FeatureCollection into classes with an equal number of items in each.

Author:
Cory Horner, Refractions Research Inc.
Module:
modules/library/main (gt-main.jar)

Field Summary
 
Fields inherited from class ClassificationFunction
LOGGER
 
Fields inherited from class DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Fields inherited from interface Expression
NIL
 
Fields inherited from interface Expression
NIL
 
Constructor Summary
QuantileFunction()
           
 
Method Summary
 Object evaluate(Object feature)
          This method checks if the object is an instance of Feature and if so, calls through to #evaluate(Feature).
 int getArgCount()
          Returns the number of arguments this requires.
 
Methods inherited from class ClassificationFunction
accept, decimalPlaces, evaluate, fixRound, getArgs, getClasses, getExpression, getFallbackValue, getImplementationHints, getName, getNumberOfClasses, getParameters, getProgressListener, round, setArgs, setClasses, setExpression, setFallbackValue, setName, setNumberOfClasses, setParameters, setProgressListener
 
Methods inherited from class DefaultExpression
accept, getType, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class ExpressionAbstract
eval, eval, evaluate
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface FunctionExpression
getType
 
Methods inherited from interface Expression
accept, getValue
 
Methods inherited from interface Expression
evaluate
 
Methods inherited from interface Expression
evaluate
 

Constructor Detail

QuantileFunction

public QuantileFunction()
Method Detail

getArgCount

public int getArgCount()
Description copied from interface: FunctionExpression
Returns the number of arguments this requires. For example [arg1][arg2]. This function must have EXACTLY 2 arguments, so this function would return 2. The parser might use this information to ensure validity, and its also for reporting capabilities. NOTE: this was previously javadoc-ed incorrectly, please note the new definition. NOTE: you cannot have a function with a variable number of arguments.

Specified by:
getArgCount in interface FunctionExpression
Specified by:
getArgCount in class ClassificationFunction
Returns:
the number of args required by this function.

evaluate

public Object evaluate(Object feature)
Description copied from class: DefaultExpression
This method checks if the object is an instance of Feature and if so, calls through to #evaluate(Feature). This is done to maintain backwards compatability with previous version of Expression api which depended on Feature. If the object is not an instance of feature the super implementation is called.

Specified by:
evaluate in interface Expression
Specified by:
evaluate in class ClassificationFunction


Copyright © 1996-2009 Geotools. All Rights Reserved.