Libraryless. Click here for Pure Java version (56L/1K).
static Int nullIfZero(Int i) { ret eq(i, 0) ? null : i; } static Float nullIfZero(Float f) { ret eq(f, 0f) ? null : f; } static Double nullIfZero(Double d) { ret eq(d, 0.0) ? null : d; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1024788 | 
| Snippet name: | nullIfZero | 
| Eternal ID of this version: | #1024788/4 | 
| Text MD5: | c80fd9636d13ef065b0e81f8b536d915 | 
| Transpilation MD5: | c2a22584a27283d83c13a2766ac5322e | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2021-10-18 04:38:17 | 
| Source code size: | 204 bytes / 11 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 440 / 584 | 
| Version history: | 3 change(s) | 
| Referenced in: | [show references] |