org.geotools.brewer.color
Class PaletteFunction
java.lang.Object
org.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.FunctionExpressionImpl
org.geotools.brewer.color.PaletteFunction
- All Implemented Interfaces:
- org.opengis.filter.expression.Expression, Expression, ExpressionType, Factory, org.opengis.filter.expression.Function, FunctionExpression
- public class PaletteFunction
- extends FunctionExpressionImpl
- implements FunctionExpression
- Author:
- James Macgill
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 |
PaletteFunction
public PaletteFunction()
- Creates a new instance of PaletteFunction
PaletteFunction
public PaletteFunction(FilterFactory factory)
setFilterFactory
public void setFilterFactory(FilterFactory factory)
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 FunctionExpressionImpl
- Returns:
- the number of args.
getArgs
public Expression[] getArgs()
- Description copied from interface:
FunctionExpression
- Gets the arguments to be evaluated by this function.
- Specified by:
getArgs in interface FunctionExpression- Overrides:
getArgs in class FunctionExpressionImpl
getName
public java.lang.String getName()
- Description copied from interface:
FunctionExpression
- Gets the name of this function.
- Specified by:
getName in interface FunctionExpression- Overrides:
getName in class FunctionExpressionImpl
- Returns:
- the name of the function.
setArgs
public void setArgs(Expression[] args)
- Description copied from interface:
FunctionExpression
- Sets the arguments to be evaluated by this function.
- Specified by:
setArgs in interface FunctionExpression- Overrides:
setArgs in class FunctionExpressionImpl
getEvaluationExpression
public Expression getEvaluationExpression()
setEvaluationExpression
public void setEvaluationExpression(Expression e)
getClassifier
public ClassificationFunction getClassifier()
setClassifier
public void setClassifier(ClassificationFunction cf)
getNumberOfClasses
public int getNumberOfClasses()
setNumberOfClasses
public void setNumberOfClasses(int i)
getPaletteName
public java.lang.String getPaletteName()
setPaletteName
public void setPaletteName(java.lang.String s)
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- Overrides:
evaluate 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.