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

11
LINES

< > BotCompany Repo | #1036162 // wrapLongArrayAsList - mutable

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

Libraryless. Click here for Pure Java version (9182L/51K).

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

Author comment

Began life as a copy of #1035682

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036162
Snippet name: wrapLongArrayAsList - mutable
Eternal ID of this version: #1036162/3
Text MD5: f64f345efcd2423bade90e59142ab892
Transpilation MD5: 8c2623a5ab910f142026101565e34a90
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-03 19:33:10
Source code size: 286 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 60 / 83
Version history: 2 change(s)
Referenced in: [show references]