org.geotools.filter.function
Class CustomClassifierFunction
java.lang.Object
org.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.FunctionExpressionImpl
org.geotools.filter.function.ClassificationFunction
org.geotools.filter.function.CustomClassifierFunction
- All Implemented Interfaces:
- org.opengis.filter.expression.Expression, Expression, ExpressionType, Factory, org.opengis.filter.expression.Function, FunctionExpression
- public class CustomClassifierFunction
- extends ClassificationFunction
This is a sort of mock-classifier. It contains pre-defined ranges/explicit values for the classification function, and masquerades as a hybrid of the Explicit and Ranged classifiers.
- Author:
- Cory Horner, Refractions Research Inc.
Fields inherited from interface org.geotools.filter.expression.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 |
Method Summary |
java.lang.Object |
evaluate(Feature feature)
Evaluates the expression against an instance of Feature . |
java.lang.Object |
getMax(int index)
Returns the ranged value maximum, or null if not defined. |
java.lang.Object |
getMin(int index)
Returns the ranged value minimum, or null if not defined. |
java.lang.String |
getName()
Gets the name of this function. |
java.lang.Object |
getValue(int index)
Returns the explicit value(s), or null if not defined. |
boolean |
hasExplicit(int index)
|
boolean |
hasRanged(int index)
|
void |
setExplicitValues(int index,
java.lang.Object value)
|
void |
setRangedValues(int index,
java.lang.Object min,
java.lang.Object max)
|
Methods inherited from class org.geotools.filter.function.ClassificationFunction |
decimalPlaces, fixRound, getArgCount, getArgs, getCollection, getExpression, getNumberOfClasses, getProgressListener, round, setArgs, setCollection, setExpression, setNumberOfClasses, setProgressListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opengis.filter.expression.Expression |
accept, evaluate |
Methods inherited from interface org.opengis.filter.expression.Function |
getParameters, setName, setParameters |
CustomClassifierFunction
public CustomClassifierFunction()
getName
public java.lang.String getName()
- Description copied from interface:
FunctionExpression
- Gets the name of this function.
- Specified by:
getName
in interface FunctionExpression
- Specified by:
getName
in class ClassificationFunction
setRangedValues
public void setRangedValues(int index,
java.lang.Object min,
java.lang.Object max)
setExplicitValues
public void setExplicitValues(int index,
java.lang.Object value)
hasRanged
public boolean hasRanged(int index)
hasExplicit
public boolean hasExplicit(int index)
evaluate
public java.lang.Object evaluate(Feature feature)
- Description copied from interface:
Expression
- Evaluates the expression against an instance of
Feature
.
- Specified by:
evaluate
in interface Expression
- Specified by:
evaluate
in class ClassificationFunction
getValue
public java.lang.Object getValue(int index)
- Returns the explicit value(s), or null if not defined.
- Overrides:
getValue
in class ClassificationFunction
getMin
public java.lang.Object getMin(int index)
- Returns the ranged value minimum, or null if not defined.
- Parameters:
index
-
- Returns:
getMax
public java.lang.Object getMax(int index)
- Returns the ranged value maximum, or null if not defined.
- Parameters:
index
-
- Returns:
Copyright © GeoTools. All Rights Reserved.