Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

3
LINES

< > BotCompany Repo | #1032218 // orZero - unnull Int, Double etc.

JavaX fragment (include)

1  
static int orZero(Int i) { ret i == null ? 0 : i; }
2  
static long orZero(Long l) { ret l == null ? 0L : l; }
3  
static double orZero(Double d) { ret d == null ? 0.0 : d; }

Author comment

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: 189 / 201
Referenced in: [show references]