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

7
LINES

< > BotCompany Repo | #1025274 // pairsSortedByBDesc

JavaX fragment (include)

static <A, B> L<Pair<A, B>> pairsSortedByBDesc(Collection<Pair<A, B>> l) {
  ret sortedByComparator(l, new Comparator<Pair<A, B>>() {
    public int compare(Pair<A, B> a, Pair<A, B> b) {
      ret cmp(b.b, a.b);
    }
  });
}

Author comment

Began life as a copy of #1017307

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1025274
Snippet name: pairsSortedByBDesc
Eternal ID of this version: #1025274/1
Text MD5: 3d86bd0017918a68f22799338367a090
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-17 01:57:40
Source code size: 231 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 269 / 301
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1027824 - pairsASortedByBDesc
#1031678 - pairsSortedByB
#1035512 - pairsSortedByADesc