java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.Functions

public final class Functions extends Object
List of functions that can be used in MapCSS expressions.

First parameter can be of type Environment (if needed). This is automatically filled in by JOSM and the user only sees the remaining arguments. When one of the user supplied arguments cannot be converted the expected type or is null, the function is not called and it returns null immediately. Add the annotation ExpressionFactory.NullableArguments to allow null arguments. Every method must be static.

Since:
15245 (extracted from ExpressionFactory)
  • Constructor Details

  • Method Details

    • eval

      public static Object eval(Object o)
      Identity function for compatibility with MapCSS specification.
      Parameters:
      o - any object
      Returns:
      o unchanged
    • plus

      public static double plus(double a, double b)
      Function associated to the numeric "+" operator.
      Parameters:
      a - the first operand
      b - the second operand
      Returns:
      Sum of arguments
      See Also:
    • minus

      public static double minus(double a, double b)
      Function associated to the numeric "-" operator.
      Parameters:
      a - the first operand
      b - the second operand
      Returns:
      Subtraction of arguments
    • times

      public static double times(double a, double b)
      Function associated to the numeric "*" operator.
      Parameters:
      a - the first operand
      b - the second operand
      Returns:
      Multiplication of arguments
    • divided_by

      public static double divided_by(double a, double b)
      Function associated to the numeric "/" operator.
      Parameters:
      a - the first operand
      b - the second operand
      Returns:
      Division of arguments
    • mod

      public static float mod(float a, float b)
      Function associated to the math modulo "%" operator.
      Parameters:
      a - first value
      b - second value
      Returns:
      a mod b, e.g., mod(7, 5) = 2
    • list

      public static List<Object> list(Environment ignored, Object... args)
      Creates a list of values, e.g., for the dashes property.
      Parameters:
      ignored - The environment (ignored)
      args - The values to put in a list
      Returns:
      list of values
      See Also:
    • count

      public static Integer count(List<?> lst)
      Returns the number of elements in a list.
      Parameters:
      lst - the list
      Returns:
      length of the list
    • any

      public static Object any(Environment ignored, Object... args)
      Returns the first non-null object. The name originates from MapCSS standard.
      Parameters:
      ignored - The environment (ignored)
      args - arguments
      Returns:
      the first non-null object
      See Also:
    • get

      public static Object get(List<?> lst, float n)
      Get the nth element of the list lst (counting starts at 0).
      Parameters:
      lst - list
      n - index
      Returns:
      nth element of the list, or null if index out of range
      Since:
      5699
    • split

      public static List<String> split(String sep, String toSplit)
      Splits string toSplit at occurrences of the separator string sep and returns a list of matches.
      Parameters:
      sep - separator string
      toSplit - string to split
      Returns:
      list of matches
      Since:
      5699
      See Also:
    • rgb

      public static Color rgb(float r, float g, float b)
      Creates a color value with the specified amounts of red, green, blue (arguments from 0.0 to 1.0)
      Parameters:
      r - the red component
      g - the green component
      b - the blue component
      Returns:
      color matching the given components
      See Also:
    • rgba

      public static Color rgba(float r, float g, float b, float alpha)
      Creates a color value with the specified amounts of red, green, blue, alpha (arguments from 0.0 to 1.0)
      Parameters:
      r - the red component
      g - the green component
      b - the blue component
      alpha - the alpha component
      Returns:
      color matching the given components
      See Also:
    • hsb_color

      public static Color hsb_color(float h, float s, float b)
      Create color from hsb color model. (arguments form 0.0 to 1.0)
      Parameters:
      h - hue
      s - saturation
      b - brightness
      Returns:
      the corresponding color
    • html2color

      public static Color html2color(String html)
      Creates a color value from an HTML notation, i.e., #rrggbb.
      Parameters:
      html - HTML notation
      Returns:
      color matching the given notation
    • color2html

      public static String color2html(Color c)
      Computes the HTML notation (#rrggbb) for a color value).
      Parameters:
      c - color
      Returns:
      HTML notation matching the given color
    • red

      public static float red(Color c)
      Get the value of the red color channel in the rgb color model
      Parameters:
      c - color
      Returns:
      the red color channel in the range [0;1]
      See Also:
    • green

      public static float green(Color c)
      Get the value of the green color channel in the rgb color model
      Parameters:
      c - color
      Returns:
      the green color channel in the range [0;1]
      See Also:
    • blue

      public static float blue(Color c)
      Get the value of the blue color channel in the rgb color model
      Parameters:
      c - color
      Returns:
      the blue color channel in the range [0;1]
      See Also:
    • alpha

      public static float alpha(Color c)
      Get the value of the alpha channel in the rgba color model
      Parameters:
      c - color
      Returns:
      the alpha channel in the range [0;1]
      See Also:
    • concat

      public static String concat(Environment ignored, Object... args)
      Assembles the strings to one.
      Parameters:
      ignored - The environment (ignored)
      args - arguments
      Returns:
      assembled string
      See Also:
    • join

      public static String join(Environment ignored, String... args)
      Assembles the strings to one, where the first entry is used as separator.
      Parameters:
      ignored - The environment (ignored)
      args - arguments. First one is used as separator
      Returns:
      assembled string
      See Also:
    • join_list

      public static String join_list(String separator, List<String> values)
      Joins a list of values into a single string with fields separated by separator.
      Parameters:
      separator - the separator
      values - collection of objects
      Returns:
      assembled string
      See Also:
    • prop

      public static Object prop(Environment env, String key)
      Returns the value of the property key, e.g., prop("width").
      Parameters:
      env - the environment
      key - the property key
      Returns:
      the property value
    • prop

      public static Object prop(Environment env, String key, String layer)
      Returns the value of the property key from layer layer.
      Parameters:
      env - the environment
      key - the property key
      layer - layer
      Returns:
      the property value
    • is_prop_set

      public static Boolean is_prop_set(Environment env, String key)
      Determines whether property key is set.
      Parameters:
      env - the environment
      key - the property key
      Returns:
      true if the property is set, false otherwise
    • is_prop_set

      public static Boolean is_prop_set(Environment env, String key, String layer)
      Determines whether property key is set on layer layer.
      Parameters:
      env - the environment
      key - the property key
      layer - layer
      Returns:
      true if the property is set, false otherwise
    • tag

      public static String tag(Environment env, String key)
      Gets the value of the key key from the object in question.
      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      the value for given key
    • tag_regex

      public static List<String> tag_regex(Environment env, String keyRegex)
      Get keys that follow a regex
      Parameters:
      env - the environment
      keyRegex - the pattern that the key must match
      Returns:
      the values for the keys that match the pattern
      Since:
      15315
      See Also:
    • tag_regex

      public static List<String> tag_regex(Environment env, String keyRegex, String flags)
      Get keys that follow a regex
      Parameters:
      env - the environment
      keyRegex - the pattern that the key must match
      flags - a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
      Returns:
      the values for the keys that match the pattern
      Since:
      15315
      See Also:
    • parse_regex_flags

      private static int parse_regex_flags(String flags)
      Parse flags for regex usage. Shouldn't be used in mapcss
      Parameters:
      flags - a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
      Returns:
      An int that can be used by a Pattern object
      See Also:
    • parent_tag

      public static String parent_tag(Environment env, String key)
      Gets the first non-null value of the key key from the object's parent(s).
      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      first non-null value of the key key from the object's parent(s)
    • parent_tags

      public static List<String> parent_tags(Environment env, String key)
      Gets a list of all non-null values of the key key from the object's parent(s).

      The values are sorted according to AlphanumComparator.

      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      a list of non-null values of the key key from the object's parent(s)
    • parent_way_angle

      public static Double parent_way_angle(Environment env)
      Get the rotation angle of the preceding parent way segment at the node location. If there is no preceding parent way segment, the following way segment is used instead. Requires a parent way object matched via child selector.
      Parameters:
      env - the environment
      Returns:
      the rotation angle of the parent way segment at the node in radians, otherwise null if there is no matching parent way or the object is not a node
      Since:
      18664
    • child_tag

      public static String child_tag(Environment env, String key)
      Gets the value of the key key from the object's child.
      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      the value of the key key from the object's child, or null if there is no child
    • parent_osm_id

      public static Long parent_osm_id(Environment env)
      Returns the OSM id of the object's parent.

      Parent must be matched by child selector.

      Parameters:
      env - the environment
      Returns:
      the OSM id of the object's parent, if available, or null
      See Also:
    • parent_osm_primitives

      public static List<IPrimitive> parent_osm_primitives(Environment env, String key, String keyValue)
      Gets a list of all OSM id's of the object's parent(s) with a specified key.
      Parameters:
      env - the environment
      key - the OSM key
      keyValue - the regex value of the OSM key
      Returns:
      a list of non-null values of the OSM id's from the object's parent(s)
      Since:
      18829
    • parent_osm_primitives

      Gets a list of all OSM id's of the object's parent(s) with a specified key.
      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      a list of non-null values of the OSM id's from the object's parent(s)
      Since:
      18829
    • parent_osm_primitives

      Gets a list of all OSM id's of the object's parent(s).
      Parameters:
      env - the environment
      Returns:
      a list of non-null values of the OSM id's from the object's parent(s)
      Since:
      18829
    • convert_primitives_to_string

      Convert Primitives to a string
      Parameters:
      primitives - The primitives to convert
      Returns:
      A list of strings in the format type + id (in the list order)
      Since:
      18829
      See Also:
    • convert_primitive_to_string

      public static String convert_primitive_to_string(PrimitiveId primitive)
      Convert a primitive to a string
      Parameters:
      primitive - The primitive to convert
      Returns:
      A string in the format type + id
      Since:
      18829
      See Also:
    • gpx_distance

      public static double gpx_distance(Environment env)
      Returns the lowest distance between the OSM object and a GPX point

      Parameters:
      env - the environment
      Returns:
      the distance between the object and the closest gpx point or Double.MAX_VALUE
      Since:
      14802
    • has_tag_key

      public static boolean has_tag_key(Environment env, String key)
      Determines whether the object has a tag with the given key.
      Parameters:
      env - the environment
      key - the OSM key
      Returns:
      true if the object has a tag with the given key, false otherwise
    • index

      public static Float index(Environment env)
      Returns the index of node in parent way or member in parent relation.
      Parameters:
      env - the environment
      Returns:
      the index as float. Starts at 1
    • sort

      public static List<String> sort(Environment ignored, String... sortables)
      Sort an array of strings
      Parameters:
      ignored - The environment (ignored)
      sortables - The array to sort
      Returns:
      The sorted list
      Since:
      15279
    • sort_list

      public static List<String> sort_list(List<String> sortables)
      Sort a list of strings
      Parameters:
      sortables - The list to sort
      Returns:
      The sorted list
      Since:
      15279
    • uniq

      public static List<String> uniq(Environment ignored, String... values)
      Get unique values
      Parameters:
      ignored - The environment (ignored)
      values - A list of values that may have duplicates
      Returns:
      A list with no duplicates
      Since:
      15323
    • uniq_list

      public static List<String> uniq_list(List<String> values)
      Get unique values
      Parameters:
      values - A list of values that may have duplicates
      Returns:
      A list with no duplicates
      Since:
      15323
    • role

      public static String role(Environment env)
      Returns the role of current object in parent relation, or role of child if current object is a relation.
      Parameters:
      env - the environment
      Returns:
      role of current object in parent relation, or role of child if current object is a relation
      See Also:
    • count_roles

      public static int count_roles(Environment env, String... roles)
      Returns the number of primitives in a relation with the specified roles.
      Parameters:
      env - the environment
      roles - The roles to count in the relation
      Returns:
      The number of relation members with the specified role
      Since:
      15196
    • areasize

      public static Float areasize(Environment env)
      Returns the area of a closed way or multipolygon in square meters or null.
      Parameters:
      env - the environment
      Returns:
      the area of a closed way or multipolygon in square meters or null
      See Also:
    • waylength

      public static Float waylength(Environment env)
      Returns the length of the way in metres or null.
      Parameters:
      env - the environment
      Returns:
      the length of the way in metres or null.
      See Also:
    • not

      public static boolean not(boolean b)
      Function associated to the logical "!" operator.
      Parameters:
      b - boolean value
      Returns:
      true if !b
    • greater_equal

      public static boolean greater_equal(float a, float b)
      Function associated to the logical ">=" operator.
      Parameters:
      a - first value
      b - second value
      Returns:
      true if a >= b
    • less_equal

      public static boolean less_equal(float a, float b)
      Function associated to the logical "<=" operator.
      Parameters:
      a - first value
      b - second value
      Returns:
      true if a <= b
    • greater

      public static boolean greater(float a, float b)
      Function associated to the logical ">" operator.
      Parameters:
      a - first value
      b - second value
      Returns:
      true if a > b
    • less

      public static boolean less(float a, float b)
      Function associated to the logical "<" operator.
      Parameters:
      a - first value
      b - second value
      Returns:
      true if a < b
    • degree_to_radians

      public static double degree_to_radians(double degree)
      Converts an angle in degrees to radians.
      Parameters:
      degree - the angle in degrees
      Returns:
      the angle in radians
      See Also:
    • cardinal_to_radians

      public static Double cardinal_to_radians(String cardinal)
      Converts an angle diven in cardinal directions to radians. The following values are supported: n, north, ne, northeast, e, east, se, southeast, s, south, sw, southwest, w, west, nw, northwest.
      Parameters:
      cardinal - the angle in cardinal directions.
      Returns:
      the angle in radians
      See Also:
    • equal

      public static boolean equal(Object a, Object b)
      Determines if the objects a and b are equal.
      Parameters:
      a - First object
      b - Second object
      Returns:
      true if objects are equal, false otherwise
      See Also:
    • not_equal

      public static boolean not_equal(Object a, Object b)
      Determines if the objects a and b are not equal.
      Parameters:
      a - First object
      b - Second object
      Returns:
      false if objects are equal, true otherwise
      See Also:
    • JOSM_search

      public static Boolean JOSM_search(Environment env, String searchStr)
      Determines whether the JOSM search with searchStr applies to the object.
      Parameters:
      env - the environment
      searchStr - the search string
      Returns:
      true if the JOSM search with searchStr applies to the object
      See Also:
    • JOSM_pref

      public static String JOSM_pref(Environment env, String key, String def)
      Obtains the JOSM key Preferences string for key key, and defaults to def if that is null.

      If the default value can be converted to a Color, the NamedColorProperty is retrieved as string.

      Parameters:
      env - the environment
      key - Key in JOSM preference
      def - Default value
      Returns:
      value for key, or default value if not found
    • regexp_test

      public static boolean regexp_test(String pattern, String target)
      Tests if string target matches pattern pattern
      Parameters:
      pattern - The regex expression
      target - The character sequence to be matched
      Returns:
      true if, and only if, the entire region sequence matches the pattern
      Since:
      5699
      See Also:
    • regexp_test

      public static boolean regexp_test(String pattern, String target, String flags)
      Tests if string target matches pattern pattern
      Parameters:
      pattern - The regex expression
      target - The character sequence to be matched
      flags - a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
      Returns:
      true if, and only if, the entire region sequence matches the pattern
      Since:
      5699
      See Also:
    • regexp_match

      public static List<String> regexp_match(String pattern, String target, String flags)
      Tries to match string against pattern regexp and returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. string). Further elements correspond to the bracketed parts of the regular expression.
      Parameters:
      pattern - The regex expression
      target - The character sequence to be matched
      flags - a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
      Returns:
      a list of capture groups if Matcher.matches(), or null.
      Since:
      5701
      See Also:
    • regexp_match

      public static List<String> regexp_match(String pattern, String target)
      Tries to match string against pattern regexp and returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. string). Further elements correspond to the bracketed parts of the regular expression.
      Parameters:
      pattern - The regex expression
      target - The character sequence to be matched
      Returns:
      a list of capture groups if Matcher.matches(), or null.
      Since:
      5701
    • osm_id

      public static long osm_id(Environment env)
      Returns the OSM id of the current object.
      Parameters:
      env - the environment
      Returns:
      the OSM id of the current object
      See Also:
    • osm_user_name

      public static String osm_user_name(Environment env)
      Returns the OSM user name who last touched the current object.
      Parameters:
      env - the environment
      Returns:
      the OSM user name who last touched the current object
      Since:
      15246
      See Also:
    • osm_user_id

      public static long osm_user_id(Environment env)
      Returns the OSM user id who last touched the current object.
      Parameters:
      env - the environment
      Returns:
      the OSM user id who last touched the current object
      Since:
      15246
      See Also:
    • osm_version

      public static int osm_version(Environment env)
      Returns the version number of the current object.
      Parameters:
      env - the environment
      Returns:
      the version number of the current object
      Since:
      15246
      See Also:
    • osm_changeset_id

      public static int osm_changeset_id(Environment env)
      Returns the id of the changeset the current object was last uploaded to.
      Parameters:
      env - the environment
      Returns:
      the id of the changeset the current object was last uploaded to
      Since:
      15246
      See Also:
    • osm_timestamp

      public static int osm_timestamp(Environment env)
      Returns the time of last modification to the current object, as timestamp.
      Parameters:
      env - the environment
      Returns:
      the time of last modification to the current object, as timestamp
      Since:
      15246
      See Also:
    • tr

      public static String tr(Environment ignored, String... args)
      Translates some text for the current locale. The first argument is the text to translate, and the subsequent arguments are parameters for the string indicated by {0}, {1}, …
      Parameters:
      ignored - The environment (ignored)
      args - arguments
      Returns:
      the translated string
    • substring

      public static String substring(String s, float begin)
      Returns the substring of s starting at index begin (inclusive, 0-indexed).
      Parameters:
      s - The base string
      begin - The start index
      Returns:
      the substring
      See Also:
    • substring

      public static String substring(String s, float begin, float end)
      Returns the substring of s starting at index begin (inclusive) and ending at index end, (exclusive, 0-indexed).
      Parameters:
      s - The base string
      begin - The start index
      end - The end index. If negative, it counts from the end of the string
      Returns:
      the substring
      See Also:
    • replace

      public static String replace(String s, String target, String replacement)
      Replaces in s every target} substring by replacement.
      Parameters:
      s - The source string
      target - The sequence of char values to be replaced
      replacement - The replacement sequence of char values
      Returns:
      The resulting string
      See Also:
    • upper

      public static String upper(String s)
      Converts string s to uppercase.
      Parameters:
      s - The source string
      Returns:
      The resulting string
      Since:
      11756
      See Also:
    • lower

      public static String lower(String s)
      Converts string s to lowercase.
      Parameters:
      s - The source string
      Returns:
      The resulting string
      Since:
      11756
      See Also:
    • title

      public static String title(String str)
      Returns a title-cased version of the string where words start with an uppercase character and the remaining characters are lowercase

      Also known as "capitalize".

      Parameters:
      str - The source string
      Returns:
      The resulting string
      Since:
      17613
      See Also:
    • trim

      public static String trim(String s)
      Trim whitespaces from the string s.
      Parameters:
      s - The source string
      Returns:
      The resulting string
      Since:
      11756
      See Also:
    • trim_list

      public static List<String> trim_list(List<String> strings)
      Trim whitespaces from the strings strings.
      Parameters:
      strings - The list of strings to strip
      Returns:
      The resulting string
      Since:
      15591
      See Also:
    • is_similar

      public static boolean is_similar(String string1, String string2)
      Check if two strings are similar, but not identical, i.e., have a Levenshtein distance of 1 or 2.
      Parameters:
      string1 - first string to compare
      string2 - second string to compare
      Returns:
      true if the normalized strings are different but only a "little bit"
      Since:
      14371
      See Also:
    • URL_decode

      public static String URL_decode(String s)
      Percent-decode a string. (See https://en.wikipedia.org/wiki/Percent-encoding)

      This is especially useful for wikipedia titles

      Parameters:
      s - url-encoded string
      Returns:
      the decoded string, or original in case of an error
      Since:
      11756
    • URL_encode

      public static String URL_encode(String s)
      Percent-encode a string. (See https://en.wikipedia.org/wiki/Percent-encoding)

      This is especially useful for data urls, e.g. concat("data:image/svg+xml,", URL_encode("<svg>...</svg>"));

      Parameters:
      s - arbitrary string
      Returns:
      the encoded string
    • XML_encode

      public static String XML_encode(String s)
      XML-encode a string.

      Escapes special characters in xml. Alternative to using <![CDATA[ ... ]]> blocks.

      Parameters:
      s - arbitrary string
      Returns:
      the encoded string
    • siunit_length

      public static String siunit_length(String s)
      Convert a length unit to meters

      Tries to convert a length unit to meter value or returns null when impossible

      Parameters:
      s - arbitrary string representing a length
      Returns:
      the length converted to meters
      Since:
      19089
    • CRC32_checksum

      public static long CRC32_checksum(String s)
      Calculates the CRC32 checksum from a string (based on RFC 1952).
      Parameters:
      s - the string
      Returns:
      long value from 0 to 2^32-1
    • is_right_hand_traffic

      public static boolean is_right_hand_traffic(Environment env)
      check if there is right-hand traffic at the current location
      Parameters:
      env - the environment
      Returns:
      true if there is right-hand traffic
      Since:
      7193
    • is_clockwise

      public static boolean is_clockwise(Environment env)
      Determines whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order.
      Parameters:
      env - the environment
      Returns:
      true if the way is closed and oriented clockwise
    • is_anticlockwise

      public static boolean is_anticlockwise(Environment env)
      Determines whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order.
      Parameters:
      env - the environment
      Returns:
      true if the way is closed and oriented clockwise
    • print

      public static Object print(Object o)
      Prints the object to the command line (for debugging purpose).
      Parameters:
      o - the object
      Returns:
      the same object, unchanged
    • println

      public static Object println(Object o)
      Prints the object to the command line, with new line at the end (for debugging purpose).
      Parameters:
      o - the object
      Returns:
      the same object, unchanged
    • number_of_tags

      public static int number_of_tags(Environment env)
      Get the number of tags for the current primitive.
      Parameters:
      env - the environment
      Returns:
      number of tags
    • setting

      public static Object setting(Environment env, String key)
      Get value of a setting.
      Parameters:
      env - the environment
      key - setting key (given as layer identifier, e.g. setting::mykey {...})
      Returns:
      the value of the setting (calculated when the style is loaded)
    • center

      public static LatLon center(Environment env)
      Returns the center of the environment OSM primitive.
      Parameters:
      env - the environment
      Returns:
      the center of the environment OSM primitive
      Since:
      11247
    • inside

      public static boolean inside(Environment env, String codes)
      Determines if the object is inside territories matching given ISO3166 codes.
      Parameters:
      env - the environment
      codes - comma-separated list of ISO3166-1-alpha2 or ISO3166-2 country/subdivision codes
      Returns:
      true if the object is inside territory matching given ISO3166 codes
      Since:
      11247
    • outside

      public static boolean outside(Environment env, String codes)
      Determines if the object is outside territories matching given ISO3166 codes.
      Parameters:
      env - the environment
      codes - comma-separated list of ISO3166-1-alpha2 or ISO3166-2 country/subdivision codes
      Returns:
      true if the object is outside territory matching given ISO3166 codes
      Since:
      11247
    • at

      public static boolean at(Environment env, double lat, double lon)
      Determines if the object centroid lies at given lat/lon coordinates.
      Parameters:
      env - the environment
      lat - latitude, i.e., the north-south position in degrees
      lon - longitude, i.e., the east-west position in degrees
      Returns:
      true if the object centroid lies at given lat/lon coordinates
      Since:
      12514
    • to_boolean

      public static boolean to_boolean(String value)
      Parses the string argument as a boolean.
      Parameters:
      value - the String containing the boolean representation to be parsed
      Returns:
      the boolean represented by the string argument
      Since:
      16110
      See Also:
    • to_byte

      public static byte to_byte(String value)
      Parses the string argument as a byte.
      Parameters:
      value - the String containing the byte representation to be parsed
      Returns:
      the byte represented by the string argument
      Since:
      16110
      See Also:
    • to_short

      public static short to_short(String value)
      Parses the string argument as a short.
      Parameters:
      value - the String containing the short representation to be parsed
      Returns:
      the short represented by the string argument
      Since:
      16110
      See Also:
    • to_int

      public static int to_int(String value)
      Parses the string argument as an int.
      Parameters:
      value - the String containing the int representation to be parsed
      Returns:
      the int represented by the string argument
      Since:
      16110
      See Also:
    • to_long

      public static long to_long(String value)
      Parses the string argument as a long.
      Parameters:
      value - the String containing the long representation to be parsed
      Returns:
      the long represented by the string argument
      Since:
      16110
      See Also:
    • to_float

      public static float to_float(String value)
      Parses the string argument as a float.
      Parameters:
      value - the String containing the float representation to be parsed
      Returns:
      the float represented by the string argument
      Since:
      16110
      See Also:
    • to_double

      public static double to_double(String value)
      Parses the string argument as a double.
      Parameters:
      value - the String containing the double representation to be parsed
      Returns:
      the double represented by the string argument
      Since:
      16110
      See Also: