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

7
LINES

< > BotCompany Repo | #1035512 // pairsSortedByADesc

JavaX fragment (include)

static <A, B> L<Pair<A, B>> pairsSortedByADesc(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.a, a.a);
    }
  });
}

Author comment

Began life as a copy of #1025274

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035512
Snippet name: pairsSortedByADesc
Eternal ID of this version: #1035512/1
Text MD5: 86d01ba308534d8faea56f274d832213
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-01 17:36:37
Source code size: 231 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 115 / 127
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)