Package org.geotools.mbstyle.expression
Class MBString
- Object
-
- ExpressionAbstract
-
- FunctionImpl
-
- MBExpression
-
- MBString
-
- All Implemented Interfaces:
Expression
,Function
public class MBString extends MBExpression
This class is an extension of the MBExpression containing the functions to support MapBox Style String expressions. String operators "concat", "upcase", and "downcase" are used to manipulate strings within a style.
-
-
Field Summary
-
Fields inherited from class MBExpression
colors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoom
-
Fields inherited from class FunctionImpl
functionName
-
Fields inherited from interface Expression
NIL
-
-
Constructor Summary
Constructors Constructor Description MBString(JSONArray json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
getExpression()
Will return a function base on the mbexpression string name;Expression
stringConcat()
Returns a string consisting of the concatenation of the inputs.Expression
stringDowncase()
Returns the input string converted to lowercase.Expression
stringUpcase()
Returns the input string converted to uppercase.-
Methods inherited from class MBExpression
canCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteral
-
Methods inherited from class FunctionImpl
accept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
-
Methods inherited from class ExpressionAbstract
evaluate
-
Methods inherited from interface Expression
evaluate
-
-
-
-
Method Detail
-
stringConcat
public Expression stringConcat() throws MBFormatException
Returns a string consisting of the concatenation of the inputs. Example: ["concat", string, string, ...]: string- Returns:
- concatenate expression
- Throws:
MBFormatException
-
stringDowncase
public Expression stringDowncase()
Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database. Example: ["downcase", string]: string- Returns:
- downcase string expression
-
stringUpcase
public Expression stringUpcase()
Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database. ["upcase", string]: string- Returns:
- uppercase string expression
-
getExpression
public Expression getExpression()
Will return a function base on the mbexpression string name;- Specified by:
getExpression
in classMBExpression
- Returns:
- expression based on mbexpression string name
-
-