Class 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.
    • Constructor Detail

      • MBString

        public MBString​(JSONArray json)
    • 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 class MBExpression
        Returns:
        expression based on mbexpression string name