org.geotools.filter.function
Class QuantileFunction
Object
ExpressionAbstract
DefaultExpression
ClassificationFunction
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)
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 |
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 Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Expression |
evaluate |
Methods inherited from interface Expression |
evaluate |
QuantileFunction
public QuantileFunction()
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.