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

3
LINES

< > BotCompany Repo | #1032685 // boxedIntOrLong - use int if possible, otherwise long

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (34L/1K).

static Number boxedIntOrLong(long l) {
  ret l != (int) l ? boxed(l) : boxed((int) l);
}

Author comment

Began life as a copy of #1032683

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032685
Snippet name: boxedIntOrLong - use int if possible, otherwise long
Eternal ID of this version: #1032685/1
Text MD5: a46307dd6ae23f50933b3dde4b03328e
Transpilation MD5: 65da2aa9d073272b0b0723feedccce16
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-01 23:26:55
Source code size: 90 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 101 / 140
Referenced in: [show references]