Package org.geotools.mbstyle.expression
Class MBLookup
Object
ExpressionAbstract
FunctionImpl
MBExpression
MBLookup
- All Implemented Interfaces:
Expression
,Function
-
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 -
Method Summary
Modifier and TypeMethodDescriptionDetermines which expression to use.lookupAt()
Retrieves an item from an array.Retrieves a property value from the current feature's properties, or from another object if a second argument is provided.Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.Gets the length of an array or string.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
-
Constructor Details
-
MBLookup
public MBLookup(JSONArray json)
-
-
Method Details
-
lookupAt
Retrieves an item from an array. Example: ["at", number, array]: ItemType- Returns:
- lookup array element expression
-
lookupGet
Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing. Example: ["get", string]: value ["get", string, object]: valueAs a note, the mbstyle requires json objects for lookup, and evaluates the object as such.
- Returns:
- lookup map property by bame expression
-
lookupHas
Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided. Example: ["has", string]: boolean ["has", string, object]: booleanAs a note, the mbstyle requires json objects for lookup, and evaluates the object as such.
- Returns:
- check of properties contains key expression
-
lookupLength
Gets the length of an array or string. Example: ["length", string]: number ["length", array]: number- Returns:
- length of array expression
-
getExpression
Description copied from class:MBExpression
Determines which expression to use.- Specified by:
getExpression
in classMBExpression
- Throws:
MBFormatException
-