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

7
LINES

< > BotCompany Repo | #1021506 // syncMoveElementLeft - swap element with next in list

JavaX fragment (include)

static <A> void syncMoveElementLeft(L<A> l, A a) {
  if (l == null) ret;
  synchronized(l) {
    int i = indexOf(l, a);
    if (i > 0) swapListElements(l, i, i-1);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021506
Snippet name: syncMoveElementLeft - swap element with next in list
Eternal ID of this version: #1021506/2
Text MD5: f7e63243c03f3ce9ff066e10ba2fa82f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-15 12:58:56
Source code size: 175 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 180 / 226
Version history: 1 change(s)
Referenced in: [show references]