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

6
LINES

< > BotCompany Repo | #1028512 // wrapIntArrayAsImmutableList

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

Libraryless. Click here for Pure Java version (2489L/16K).

static L<Int> wrapIntArrayAsImmutableList(int[] l) {
  ret new RandomAccessAbstractList<Int>() {
    public int size() { ret l.length; }
    public Int get(int i) { ret l[i]; }
  };
}

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: #1028512
Snippet name: wrapIntArrayAsImmutableList
Eternal ID of this version: #1028512/2
Text MD5: 71fdf6634eb0b7190bc66360844c38a9
Transpilation MD5: d224851ebbbf01cfdc170a4682fb5e65
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-23 13:54:11
Source code size: 188 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 143 / 216
Version history: 1 change(s)
Referenced in: [show references]