Number/String Conversions

Automatic conversion between numeric values and string values is done if:

  • the attribute is a string, but the corresponding attribute implementation is numeric (long, double or float)
  • the attribute is numeric (long, double or float), but the corresponding attribute implementation is a string.

In this case,

  • String means: primitive data type in {"string", "anyURI", "duration", "Name"}
  • Long means: primitive data type in {"byte", "int", "integer", "negativeInteger", "nonNegativeInteger", "nonPositiveInteger", "normalizedString", "positiveInteger", "short", "unsignedByte", "unsignedInt", "unsignedLong", "unsignedShort", "long"}
  • Float means: primitive data type in {"float"}
  • Double means: primitive data type in {"decimal", "double"}