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

7
LINES

< > BotCompany Repo | #1013536 // descFieldComparator

JavaX fragment (include)

static <A> Comparator<A> mapMethodLike descFieldComparator(fS field) {
  ret new Comparator<A>() {
    public int compare(A a, A b) {
      ret cmp(getOpt(b, field), getOpt(a, field));
    }
  };
}

Author comment

Began life as a copy of #1002452

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013536
Snippet name: descFieldComparator
Eternal ID of this version: #1013536/3
Text MD5: 70676f394625376a22e283121ab510f5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-18 12:32:48
Source code size: 203 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 389 / 438
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1018349 - calculatedFieldComparator
#1019639 - fieldComparator