static int orZero(Int i) { ret i == null ? 0 : i; } static long orZero(Long l) { ret l == null ? 0L : l; } static double orZero(Double d) { ret d == null ? 0.0 : d; }
Began life as a copy of #1022637
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032218 |
Snippet name: | orZero - unnull Int, Double etc. |
Eternal ID of this version: | #1032218/1 |
Text MD5: | 87165cf7f9fd1dfc8c6f4fcbc5f60384 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-20 11:12:01 |
Source code size: | 168 bytes / 3 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 190 / 201 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |