public class MBTypes extends MBExpression
Often, such tests and conversions are unnecessary, but they may be necessary in some expressions where the type of a certain sub-expression is ambiguous. They can also be useful in cases where your feature data has inconsistent types; for example, you could use to-number to make sure that values like ""1.5"" (instead of 1.5) are treated as numeric
colors, decisions, featureData, ff, heatMap, json, lookUp, math, name, parse, ramps, string, transformer, types, variableBindings, zoom
functionName
NIL
Constructor and Description |
---|
MBTypes(JSONArray json) |
Modifier and Type | Method and Description |
---|---|
Expression |
getExpression()
Determines which expression to use.
|
Expression |
typesArray()
Asserts that the input is an array (optionally with a specific item type and length).
|
Expression |
typesBoolean()
Asserts that the input value is a boolean.
|
Expression |
typesNumber()
Asserts that the input value is a number.
|
Expression |
typesObject()
Asserts that the input value is an object.
|
Expression |
typesString()
Asserts that the input value is a string.
|
Expression |
typesToBoolean()
Converts the input value to a boolean.
|
Expression |
typesToColor()
Converts the input value to a color.
|
Expression |
typesToNumber()
Converts the input value to a number, if possible.
|
Expression |
typesToString()
Converts the input value to a string.
|
Expression |
typesTypeOf()
Returns a string describing the type of the given value.
|
canCreate, create, getName, throwInsufficientArgumentCount, throwUnexpectedArgumentCount, transformExpression, transformLiteral
accept, dispatchArguments, equals, evaluate, functionName, getFallbackValue, getFunctionName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters, toString
evaluate
evaluate
public Expression typesArray()
public Expression typesBoolean()
public Expression typesNumber()
public Expression typesObject()
public Expression typesString()
public Expression typesToBoolean()
public Expression typesToColor()
public Expression typesToNumber()
public Expression typesToString()
public Expression typesTypeOf()
public Expression getExpression() throws MBFormatException
MBExpression
getExpression
in class MBExpression
MBFormatException
Copyright © 1996–2021 Geotools. All rights reserved.