Class ExpressionFactory.LengthFunction
java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory.LengthFunction
- All Implemented Interfaces:
Expression
- Enclosing class:
- ExpressionFactory
Function to calculate the length of a string or list in a MapCSS eval expression.
Separate implementation to support overloading for different argument types.
The use for calculating the length of a list is deprecated, use
Functions.count(java.util.List) instead (see #10061).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
arg
-
-
Constructor Details
-
LengthFunction
Constructs a newLengthFunction.- Parameters:
args- arguments
-
-
Method Details
-
evaluate
Description copied from interface:ExpressionEvaluate this expression.- Specified by:
evaluatein interfaceExpression- Parameters:
env- The environment- Returns:
- the result of the evaluation, can be a
List, String or any primitive type or wrapper classes of a primitive type.
-