public abstract class ClassificationFunction extends DefaultExpression implements FunctionExpression
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER |
NIL
Constructor and Description |
---|
ClassificationFunction(FunctionName name) |
Modifier and Type | Method and Description |
---|---|
Object |
accept(ExpressionVisitor visitor,
Object extraData)
Accepts a visitor.
|
protected int |
decimalPlaces(double slotWidth)
Determines the number of decimal places to truncate the interval at.
|
abstract Object |
evaluate(Object arg)
Subclass should override, default implementation returns null.
|
protected double |
fixRound(double value,
int decimalPlaces,
boolean up)
Corrects a round off operation by incrementing or decrementing the decimal place (preferably
the smallest one).
|
int |
getClasses() |
Literal |
getFallbackValue()
The value of the fallbackValue attribute is used as a default value, if the SE implementation
does not support the function.
|
FunctionName |
getFunctionName()
Access to the FunctionName description as used in a FilterCapabilities document.
|
Map<RenderingHints.Key,?> |
getImplementationHints()
Returns the implementation hints.
|
String |
getName()
Gets the name of this function.
|
int |
getNumberOfClasses()
Deprecated.
use getClasses()
|
List<Expression> |
getParameters()
Returns the function parameters (the contents are Expressions, usually attribute expression
and literal expression).
|
ProgressListener |
getProgressListener() |
protected double |
round(double value,
int decimalPlaces)
Truncates a double to a certain number of decimals places.
|
void |
setClasses(int classes) |
void |
setFallbackValue(Literal fallback)
Fallback value to use in the event the function is unavailable in the requested environment.
|
void |
setNumberOfClasses(int classes)
Deprecated.
use setClasses()
|
void |
setParameters(List<Expression> params)
Sets the function parameters.
|
void |
setProgressListener(ProgressListener progress) |
String |
toString()
Creates a String representation of this Function with the function name and the arguments.
|
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
evaluate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate
protected static final Logger LOGGER
public ClassificationFunction(FunctionName name)
public Object accept(ExpressionVisitor visitor, Object extraData)
Expression
return visitor.visit(this, extraData);
accept
in interface Expression
Expression.accept(ExpressionVisitor, Object)
public abstract Object evaluate(Object arg)
ExpressionAbstract
evaluate
in interface Expression
evaluate
in class ExpressionAbstract
public void setFallbackValue(Literal fallback)
FunctionExpression
The fallback value is not provided as one of the arguments, as it is an advanced option used in style layer descriptor documents to facilitate interoperability. It allows a user to specify an SQL function, and provide a value to use when the documented is used with a WFS that does not support the provided function.
setFallbackValue
in interface FunctionExpression
public Literal getFallbackValue()
Function
getFallbackValue
in interface Function
public String getName()
public FunctionName getFunctionName()
Function
getFunctionName
in interface Function
public List<Expression> getParameters()
getParameters
in interface Function
public void setParameters(List<Expression> params)
setParameters
in interface FunctionExpression
public ProgressListener getProgressListener()
public void setProgressListener(ProgressListener progress)
public int getNumberOfClasses()
public int getClasses()
public void setNumberOfClasses(int classes)
public void setClasses(int classes)
public Map<RenderingHints.Key,?> getImplementationHints()
getImplementationHints
in interface Factory
protected int decimalPlaces(double slotWidth)
slotWidth
- protected double round(double value, int decimalPlaces)
value
- number to round-offdecimalPlaces
- number of decimal places to leaveprotected double fixRound(double value, int decimalPlaces, boolean up)
value
- decimalPlaces
- up
- Copyright © 1996–2019 Geotools. All rights reserved.