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

11
LINES

< > BotCompany Repo | #1029408 // wrapIntArrayAsList - mutable

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

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

static L<Int> wrapIntArrayAsList(int[] l) {
  ret new RandomAccessAbstractList<Int>() {
    public int size() { ret l.length; }
    public Int get(int i) { ret l[i]; }
    public Int set(int i, Int val) {
      Int a = l[i];
      l[i] = val;
      ret a;
    }
  };
}

Author comment

Began life as a copy of #1028512

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: #1029408
Snippet name: wrapIntArrayAsList - mutable
Eternal ID of this version: #1029408/2
Text MD5: bb30593a94839c73b6c52ab226636623
Transpilation MD5: ef45fac2026ae9837030b5a98803d0af
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-05 17:40:47
Source code size: 278 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 131 / 197
Version history: 1 change(s)
Referenced in: [show references]