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

16
LINES

< > BotCompany Repo | #1029362 // intArrayToBoxed

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

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

static Int[] intArrayToBoxed(int[] l) {
  if (l == null) null;
  int n = l.length;
  Int[] a = new[n];
  for i to n:
    a[i] = l[i];
  ret a;
}

static Int[] intArrayToBoxed(int[] l, int from, int to) {
  if (l == null) null;
  Int[] a = new[to-from];
  for (int i = from; i < to; i++)
    a[i-from] = l[i];
  ret a;
}

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: #1029362
Snippet name: intArrayToBoxed
Eternal ID of this version: #1029362/2
Text MD5: 7648ab304c7855cefdf4a6ea5f7d6abc
Transpilation MD5: 39ed0da9cd4a69c0c3ffbfe199bb3dfc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-02 16:23:07
Source code size: 334 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 94 / 150
Version history: 1 change(s)
Referenced in: [show references]