static <A> bool addOrMoveToStart(L<A> l, A a) { int i = l.indexOf(a); if (i == 0) false; if (i > 0) l.remove(i); l.add(0, a); true; }
Began life as a copy of #1006201
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006304 |
Snippet name: | addOrMoveToStart |
Eternal ID of this version: | #1006304/1 |
Text MD5: | 0da90d5dc76f676ae1714a865e9f333f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-28 14:18:32 |
Source code size: | 149 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 591 / 596 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |