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

19
LINES

< > BotCompany Repo | #1033394 // colToList

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

Transpiled version (5049L) is out of date.

1  
static <A> L<A> colToList(Matrix<A> m, int x) {
2  
  if (m == null) null;
3  
  rangeCheck(x, m.getWidth());
4  
  int h = m.getHeight();
5  
  
6  
  ret new RandomAccessAbstractList<A>() {
7  
    public int size() { ret h; }
8  
    
9  
    public A get(int y) {
10  
      ret m.get(x, y);
11  
    }
12  
    
13  
    public A set(int y, A val) {
14  
      A old = m.get(x, y);
15  
      m.set(x, y, val);
16  
      ret old;
17  
    }
18  
  };
19  
}

Author comment

Began life as a copy of #1033132

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033394
Snippet name: colToList
Eternal ID of this version: #1033394/2
Text MD5: 073276082b2f4f27155345f781f1bde1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 01:49:12
Source code size: 399 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 217 / 302
Version history: 1 change(s)
Referenced in: [show references]