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).

1  
static L<Int> wrapIntArrayAsList(int[] l) {
2  
  ret new RandomAccessAbstractList<Int>() {
3  
    public int size() { ret l.length; }
4  
    public Int get(int i) { ret l[i]; }
5  
    public Int set(int i, Int val) {
6  
      Int a = l[i];
7  
      l[i] = val;
8  
      ret a;
9  
    }
10  
  };
11  
}

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: 134 / 201
Version history: 1 change(s)
Referenced in: [show references]