Conversions between data types.
|
|
BOOLEAN |
INTEGER
(accepts all Numbers |
FLOAT
(accepts all Numbers |
STRING |
DATE |
URI |
USERDEFINED |
| BOOLEAN |
-> |
as is |
false -> 0L
true -> 1L |
false -> 0d
true -> 1d |
false -> "false"
true -> "true" |
- |
- |
- |
| INTEGER |
-> |
0 -> false; true otherwise |
as is
(cast to Long if necessary) |
cast to Double |
signed decimal representation |
taken as milliseconds since 1970-01-01, 00:00:00 GMT |
- |
- |
| FLOAT |
-> |
0 -> false; true otherwise
(accepts all Numbers) |
discards fractional digits while casting to Long
(accepts all Numbers) |
as is
(accepts all Numbers; will be cast to Double) |
computerized scientific notation |
taken as milliseconds since 1970-01-01, 00:00:00 GMT; discards fractional digits |
- |
- |
| STRING |
-> |
"true" (ignoring case) -> true, false otherwise
(Boolean.parseBoolean(String)) |
parsed as signed decimal representation (Long.parseLong(String)) |
parsed as computerized scientific notation (Double.parseDouble(String)) |
as is |
parsed as ISO 8601 |
parsed as URI (URI.create(String)) |
encoded as UTF-8 |
| DATE |
-> |
- |
milliseconds since 1970-01-01, 00:00:00 GMT as Long |
milliseconds since 1970-01-01, 00:00:00 GMT as Double |
formatted as ISO 8601 |
as is |
- |
- |
| URI |
-> |
- |
- |
- |
as string |
- |
as is |
- |
| USERDEFINED |
-> |
- |
- |
- |
decoded as UTF-8 |
- |
- |
as is (cloned) |