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

7
LINES

< > BotCompany Repo | #1018541 // sortByIndex2_desc

JavaX fragment (include)

static <A> void sortByIndex2_desc(LL<A> l, final int index) {
  sort(l, new Comparator<L<A>>() {
    public int compare(L<A> a, L<A> b) {
      ret cmp(b.get(index), a.get(index));
    }
  });
}

Author comment

Began life as a copy of #1018540

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018541
Snippet name: sortByIndex2_desc
Eternal ID of this version: #1018541/1
Text MD5: d764cb5fec9a3853b07b01996f7a9503
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-03 22:42:44
Source code size: 200 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 292 / 336
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)